Service Desk Practitioners Forum
cancel
Showing results for 
Search instead for 
Did you mean: 

sd_dataform.bat question

SOLVED
Go to solution
Highlighted
Peter Dent
Frequent Visitor

sd_dataform.bat question

I know this has probably been asked a thousand times before but......

How to I use sd_dataform.bat from within a UI Rule???

I know I have to perform a Command Exec Action and call sd_dataform.bat and pass the parameters....

But what format should those parameters be in is the question?

I've tried every combination I can think of and looked for examples in the forum but, I can't get it to work!!!

It works perfectly from the command line. This is what I type at the CMD prompt to make it work:

sd_dataform "Person" +"searchcode=PZD" -listalways

This opens a listwindow showing all Person records with the searchcode of "PZD".

What I want to do from the rule is to list all person records that have the same searchcode as the one just tyed in on a new person form. The rule is triggered by changing the searchcode field.

Please can somebody describe, or better still attach a screen shot of an example of how to set this up within a UI rule?

Thanks.
7 REPLIES
Ruth Porter
Honored Contributor

Re: sd_dataform.bat question

Hi Peter,

I have not tried it as an exec command in a UI but I have used it in a smart action and then triggered the smart action from the UI rule.

Apart from that I would not use the plus sign before searchcode.

Give it a try and if you want, I will run up 4.5 and get some screen shots.

Hope this helps

Ruth
http://www.teamultra.net
Vasily Kamenev
Honored Contributor

Re: sd_dataform.bat question

Hi
Create UI Rule with function check before save. The function run Rule with External system where check Exist or not with same code? if yes return the number and add this number to code. if no then no.

Vassili
Peter Dent
Frequent Visitor

Re: sd_dataform.bat question

Ruth,

Thanks for that, I've created a Smart Action which almost works. It is triggered when the searcode field is changed and it opens up the ;ist window, just as I require, but, it doesn't pick up anything from the current person form to use as search criteria. So it doesn't show any results.

What I need it to do is pick up the search code from the new person record being created and use that search code to show a list of any existing records with that searchcode.

If I 'hardcode' a search code into the smart action it works, its just that I can't get it to pick up what has already been entered into the new form which is on the screen at the time.

I've included a word doc to show to smart action I have at the moment and one with the search code 'hardcoded' in there.

How do I get it to pick up from the new Person record about to be created on the screen?
Ruth Porter
Honored Contributor
Solution

Re: sd_dataform.bat question

hi Peter,

Where you have:

"Search code=Search code"

replace that with

"Searchcode=[Search code]" where you insert [Search code] by pressing the Field button and choosing Search code.

Hope this helps

Ruth
http://www.teamultra.net
Anda Apine
Member

Re: sd_dataform.bat question


1. Create smart action using application "ServiceDesk Form" if I remember correctly it was built in.
(screenshot in attachment.)

2 set to run smart action in UI rule when Search code has been changed:
When a value has changed
where Search code (*) is anything
Check searchcode (Smart action)

I tested it on SD 4.5 SP13 - working.

Anda
Peter Dent
Frequent Visitor

Re: sd_dataform.bat question

Ruth,

Doh, why didn't I see that one, "Can't see the wood for the trees", thanks that works a treat.

Full marks, excellent!

Thanks.
Peter Dent
Frequent Visitor

Re: sd_dataform.bat question

Thanks to all those who replied, I have chosen to use Ruth's suggestion as it was the closest to what I had in mind anyway.

Anda, thanks for taking the time to work it out and post the screen shot, for some reason I can't get the built in function to work so I created a new one to run sd_dataform, (I think its something to do with the %client_home% variable ?)

This should help us a great deal.

Thanks to you all.
//Add this to "OnDomLoad" event