validation on attachment (455 Views)
Reply
Occasional Contributor
Mukesh Srivastava_1
Posts: 3
Registered: ‎04-20-2011
Message 1 of 5 (455 Views)

validation on attachment

Hi Gurus,

 

Can i put a validation on attachment in SD & IM created, that it can’t be deleted once it is attached. Another/Correct one can be attached along with existing one.

Honored Contributor
DimitarPeychev
Posts: 297
Registered: ‎11-01-2011
Message 2 of 5 (433 Views)

Re: validation on attachment

Hi,

 

 I think we had the same discussion. Please check this one:

http://h30499.www3.hp.com/t5/HP-Service-Manager-Service/Validation-for-attachments/m-p/5355275/highl...

HP Support
If you find that this or any post resolved your issue, please be sure
to mark it as an accepted solution.
Please also give kudo if you find it interesting :)
Honored Contributor
DimitarPeychev
Posts: 297
Registered: ‎11-01-2011
Message 3 of 5 (432 Views)

Re: validation on attachment

[ Edited ]

Hi again,

 

It seems that you can try also using a format control query of the SYSATTACHMENT table which is the validated by a status dependent validation. A further suggestion of validating the uploader of the attachment was also suggested as a possibility.

 

This isn’t available out of the box but you should be able to tailor something to suit your needs. You didn’t mention which SM records you are working with so I will assume it is Incidents, although the principle would be the same for any.

You should be able to make a query from the Queries section of the probsummary format control to the SYSATTACHMENTS table to check that it contains records where the topic of the SYSATTACHMENTS record equal the number of the Incident record. This can then be used in the Validations of the format control record using not null(contents($file#)) where # is the actual file query number from the format control query. So if it was the third query (from top to bottom) on the format control queries page then the file variable would be $file3.

 

Please check also this discussion:

 

http://h30499.www3.hp.com/t5/HP-Service-Manager-Service/Make-attachments-mandatory-SM-7/m-p/4436449#...

HP Support
If you find that this or any post resolved your issue, please be sure
to mark it as an accepted solution.
Please also give kudo if you find it interesting :)
Occasional Contributor
Mukesh Srivastava_1
Posts: 3
Registered: ‎04-20-2011
Message 4 of 5 (412 Views)

Re: validation on attachment

Hi Thanks for your reply.

 

I am with HPSM can u pls brief me in steps how can we disable/hide remove option in attachment filed with all modules (SD,IM,CM,PM).

 

 

Honored Contributor
DimitarPeychev
Posts: 297
Registered: ‎11-01-2011
Message 5 of 5 (409 Views)

Re: validation on attachment

Hi,

 

 I can provide it right now for the change management as it was done. So for incident you will have to chenage for probsummary.

So thsi is what I found:

 

"Note: 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."

You could set this up so the change can't move out of the first phase by doing the following.

In the cm3r formatctrl record, in the Queries panel, add the following:

Update: true
Delete: true
Filename: SYSATTACHMENTS
Query: application="cm3r" and topic=number in $file

Take note of which Query entry this is. In an OOB SM7 system with the IIA Implementation, I _think_ this is query number 7 (count the number of entries in the "Add" column).

Then, in the Validations panel, do the following:
Update: true
Delete: true
Validation: not null(contents($file7))
Message: Please provide an attachment for this Change request.


Keep in mind, though... if _every_ change request requires an attachment, you'd better have hard-drive space, or a plan for removing attachments from closed Changes.

HP Support
If you find that this or any post resolved your issue, please be sure
to mark it as an accepted solution.
Please also give kudo if you find it interesting :)
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.