Getting Initiator's UserID for an External -v table process
Jose Lerebours
fpgroups at gmail.com
Sat Aug 27 14:32:12 PDT 2016
look at using -r -ry -rw ...
On 08/27/2016 05:27 PM, Stanley - stanlyn.com via Filepro-list wrote:
> Hi,
>
> A new issue...
>
> How do I get the name of the currently logged in user that initiated a
> external report. The report is run like this...
>
> 1. user is in clerk and presses "G" which triggers an @KeyG routine that
> asks the user for a GL Code and Year.
>
> 2. the process then lookups an "InTheMiddle" table to see it contains a
> record matching the current user id and report name. If found, it updates
> the year and gl_id fields to what the user selected. At this point the user
> id is "root" and is represented everywhere correctly. If not found it
> creates one with assignments: lookup(1)=@id ; lookup(2)="2016" ;
> lookup(3)="1234-456" ; lookup(4)="MyReport"
>
> 3. Next we do a system call:
> system "/appl/fp/dreport sdgl_detail -f GlDetail -A -u -v gldetail _select
> -h 'Printing GL Detail Report'"
>
> 4. The -v selection table has code in its init that lookups the
> "InTheMiddle" data file and searches for a record where lookup(1)=@id and
> lookup(4)="MyReport". If found it also grabe the gl code and year. The
> issue is here. The value of lookup(1) record in "InTheMiddle" data file is
> root and is correct, however the @id that ran the system call is "filepro"
> and therefore never matches anything.
>
> 5. I could always use record 1, or an export/import, but that limits me to
> single user as the code in the lookup table would always be pointing to the
> same place. The -v table process should never know anything about the user
> and must be able to find it based on the id that started the process.
>
> What would be ideal would be to pass a parameter to/with the system call
> such as:
> system "/appl/fp/dreport sdgl_detail -f GlDetail -A -u -v gldetail _select
> -h 'Printing GL Detail Report' with @id"
>
> Notice the "with @id" at the end as the parameter. I know this is illegal
> in filepro, just need to be able to do the same.
>
> Thanks,
> Stanley
>
> _______________________________________________
> Filepro-list mailing list
> Filepro-list at lists.celestial.com
> Subscribe/Unsubscribe/Subscription Changes
> http://mailman.celestial.com/mailman/listinfo/filepro-list
More information about the Filepro-list
mailing list