Page 1 of 1

Modify a data file based on a user

Posted: September 22nd, 2012, 6:02 pm
by pierrew
Does anybody know of an easy way to modify a specific data file (automatically) based on the user name? I know it is possible by using a separate form to specify a user then using the function execPFF. Thanks for any info.

Re: Modify a data file based on a user

Posted: September 23rd, 2012, 12:59 pm
by Gregory Martin
Given that the name of the data file must be specified in the PFF file and can't be changed (unless it's an external dictionary), your suggestion is really all that you can do. If you're actually using the login name for the machine, you can use the getusername function to retrieve it. In that case, I would create a batch application so there's no user interface that the keyer needs to bother with. The batch application would simply write out the PFF file and call execpff on it.

Re: Modify a data file based on a user

Posted: September 30th, 2012, 7:50 am
by pierrew
Thanks Greg,
That's an excellent idea of using "getuserid". I should of used that earlier. But thanks for the info ... I already created the external form file that forces the user to pick the right data file based on which team he/she is assigned to and runs a the correct PFF. (lol ... 24 different teams).
I have another question but I will post it under a new topic.
pierre