Re: Make attachment mandatory. (392 Views)
Reply
Super Advisor
deepsm
Posts: 215
Registered: ‎06-29-2011
Message 1 of 7 (450 Views)

Make attachment mandatory.

Hi experts,

 

I need to make the attachment field mandatory on selection of a particular Sub-area. How can I do so?

 

Thanks in advance.

Thanks,

Deepesh
Trusted Contributor
Lucky Duke
Posts: 141
Registered: ‎10-05-2009
Message 2 of 7 (434 Views)

Re: Make attachment mandatory.

Hi Deepsm,

 

atachments are stored in SYSATTACHMENT table.

If you want to know if there's an attachement on your record, you need to

1. edit your formatctrl, 

2. add a query to count attachments

3. add a validation to check this count is greater than zero

 

Do you know how to do that ?

 

rgds

 

Fabrice

Super Advisor
deepsm
Posts: 215
Registered: ‎06-29-2011
Message 3 of 7 (402 Views)

Re: Make attachment mandatory.

 i know for the other fields but not sure for attachmnet..

 

Aperriciate if you can help.

 

 

Thanks,

Deepesh
Honored Contributor
Piku
Posts: 3,972
Registered: ‎06-17-2010
Message 4 of 7 (399 Views)

Re: Make attachment mandatory.

Hi,

You cannot add an attachment to a record before you save it. Service Manager can attach files only to an existing record in the database.
Since attachments panel is separate java penal and attachments are saved in SYSATTACHMENTS ,so you have to query the table in fc and then place a validation and you can not mandate it while selecting the particular subarea.

hth,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Assign Kudo, if found post useful and mark it accepted if solves the issue.
http://h30499.www3.hp.com/t5/Tips-and-Tricks/Kudos-what-where-how-and-why/m-p/5677925#U5677925
Super Advisor
deepsm
Posts: 215
Registered: ‎06-29-2011
Message 5 of 7 (395 Views)

Re: Make attachment mandatory.

Hi Piku

 

I guess you wanted to reply on my other post..

 

Also please note we are able to attach docment before saving the interaction with Delay in Assigning Interaction id ? to false in Environment Records for Service Desk profile.

 

The other post says that how we can auto populate the attachment based on the subarea.

Thanks,

Deepesh
Honored Contributor
Piku
Posts: 3,972
Registered: ‎06-17-2010
Message 6 of 7 (393 Views)

Re: Make attachment mandatory.

I feel I answered on correct post.
Since attachments are saved after record save and attachment are control by separate java applet so not feel possible to link both these simultaneously.
Attachment pane does not controlled like other fields (by fc etc)

hth,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Assign Kudo, if found post useful and mark it accepted if solves the issue.
http://h30499.www3.hp.com/t5/Tips-and-Tricks/Kudos-what-where-how-and-why/m-p/5677925#U5677925
Trusted Contributor
Lucky Duke
Posts: 141
Registered: ‎10-05-2009
Message 7 of 7 (392 Views)

Re: Make attachment mandatory.

Hi,

 

here's what you have to do :

In your master format control go to queries and display extended view, then add a query :

filename = SYSATTACHMENTS

query = whatever is suitable to get the correct number of attachment (in the screen shot, i count attachment for a request)

comment = count

display = true

 

in the calculation tab, add a line

display: true

calculation: $myCount = 1 $file.count

that is if you have only one query. If your query is the second, you take (2 in $file.count).

 

finally, in validation tab, add a line

add/update: subarea in $file="your special value"

validation: $myCount>0

message: "attachment is mandatory for this subarea !!"

 

Save your format control and there you are.

 

 

Fabrice

 

other post with same question : http://h30499.www3.hp.com/t5/HP-Service-Manager-Service/Numbering-of-Change-tasks/m-p/5239829/highli...

The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.