Topic Options
Rate This Topic
#59592 - 12/28/01 02:44 PM A simple perl question - I hope
jroberts12 Offline
Stealth Member

Registered: 06/12/01
Posts: 88
How do I return a value from ARSperl to the Remdy user tool? I had planned to have the user execute the script via a button with set fields $PROCESS$? I know how to create a new record or modify an existing one, but I want this to come back to the screen. Any ideas? Sounds simple, but I can't figure it out.

Thanks,

Jeff



Top
#59593 - 12/28/01 03:55 PM Re: A simple perl question - I hope [Re: eric waddell]
peterm2 Offline
Stealth Member

Registered: 12/04/01
Posts: 42

To return a value, you have to do a 'Set Field' operation.

Just put the $PROCESS$ in as the set field value.

Let me know if you have a problem-

P

On Fri, 28 Dec 2001, Jeff Roberts wrote:

>
> How do I return a value from ARSperl to the Remdy user tool? I had planned
> to have the user execute the script via a button with set fields $PROCESS$?
> I know how to create a new record or modify an existing one, but I want this
> to come back to the screen. Any ideas? Sounds simple, but I can't figure
> it out.
>
> Thanks,
>
> Jeff
>

_____________________________




Top
#59594 - 12/31/01 09:36 AM Re: A simple Perl question - I hope [Re: eric waddell]
rrowe30 Offline
Stealth Member

Registered: 12/04/01
Posts: 10

Usually, Perl scripts run on the server so all ARS clients have access to them. The form you wish to update resides on the client machine in the User Tool. Unless your users save the form and run a Perl script that will change the field's value in the data file via the ARS API, the results of the script cannot be displayed in the user tool in the form displayed on the screen.

Perhaps you could find a way to have a Perl script resident on each client machine do this. You would then have to find a way to make the script update data in the User Tool and I have been unable to find an API call with this functionality. You would also have to install and maintain this script on each and every client machine.

-----Original Message-----
From: Jeff Roberts [mailto:JRoberts@SAIONLINE.COM]
Sent: Friday, December 28, 2001 3:45 PM
To: ARSLIST@LISTSERV.VISTAIT.COM
Subject: [ARSLIST] A simple perl question - I hope




How do I return a value from ARSperl to the Remdy user tool? I had planned to have the user execute the script via a button with set fields $PROCESS$? I know how to create a new record or modify an existing one, but I want this to come back to the screen. Any ideas? Sounds simple, but I can't figure it out.

Thanks,

Jeff



Top
#59595 - 12/31/01 02:15 PM Re: A simple Perl question - I hope [Re: eric waddell]
jroberts12 Offline
Stealth Member

Registered: 06/12/01
Posts: 88

Thanks for the detailed response.

Jeff

-----Original Message-----
From: Rowe, Robert [mailto:rrowe@GNILINK.NET]
Sent: Monday, December 31, 2001 9:37 AM
To: ARSLIST@LISTSERV.VISTAIT.COM
Subject: Re: A simple Perl question - I hope


If I understand your question at all: you want to run a Perl script to return a value to a field currently displayed on the screen without the user having to save the form, do a search or anything of that sort. Is that correct?

Usually, Perl scripts run on the server so all ARS clients have access to them. The form you wish to update resides on the client machine in the User Tool. Unless your users save the form and run a Perl script that will change the field's value in the data file via the ARS API, the results of the script cannot be displayed in the user tool in the form displayed on the screen.

Perhaps you could find a way to have a Perl script resident on each client machine do this. You would then have to find a way to make the script update data in the User Tool and I have been unable to find an API call with this functionality. You would also have to install and maintain this script on each and every client machine.

-----Original Message-----
From: Jeff Roberts [mailto:JRoberts@SAIONLINE.COM]
Sent: Friday, December 28, 2001 3:45 PM
To: ARSLIST@LISTSERV.VISTAIT.COM
Subject: [ARSLIST] A simple perl question - I hope




How do I return a value from ARSperl to the Remdy user tool? I had planned to have the user execute the script via a button with set fields $PROCESS$? I know how to create a new record or modify an existing one, but I want this to come back to the screen. Any ideas? Sounds simple, but I can't figure it out.

Thanks,

Jeff



Top
#59596 - 12/31/01 03:22 PM Re: A simple Perl question - I hope [Re: eric waddell]
kubasek 1 Offline
newbie

Registered: 06/12/01
Posts: 9

Jeff,

Actually this is very easy to do. You do NOT need to put the script on the client machines. Just do this.

1. Put the perl script on the same machine as you AR server. Make sure that what ever user the AR server runs as can execute the script. The script should return what ever value you want as standard out. (ie. print the value).

2. Build a setfields active link action with the following syntax:
$PROCESS$ @@:/what/ever/script.pl --switch "$foo bar$"

And that's it. The value will be put into the field like any other setfields action. Then just add whatever additional workflow you need (more set fields, saving the form, or what ever). This is documented pretty well in the Workflow Administrator's guide on page 9-81 in the version 4.5 manual. The same 255 unexpanded and 4096 expanded character limitations apply. It's been available since at least version 3.2, I think.

One caution though. This will run as the same (UNIX or NT) user that the arserverds run as, so be careful if you are passing it any values from fields that your users can influence.

Now if you wanted to pass back multiple values, that a bit trickier...

Joe

>>-----Original Message-----
>>From: Jeff Roberts [mailto:JRoberts@SAIONLINE.COM]
>>Sent: Friday, December 28, 2001 3:45 PM
>>To: ARSLIST@LISTSERV.VISTAIT.COM
>>Subject: [ARSLIST] A simple perl question - I hope
>>
>>How do I return a value from ARSperl to the Remdy user tool? I had planned to have the user execute the script via a button with set fields $PROCESS$? I know how to create a new record or modify an existing one, but I want this to come back to the screen. Any ideas? Sounds simple, but I can't figure it out.
>>Thanks,
>>
>>Jeff


---
Joseph Kubasek
AR Systems Administrator
The Ohio State University (Office of Information Technology)
kubasek.1@osu.edu
614-292-2277

_____________________________




Top


Moderator:  Matt Reinfeldt