Modify a data file based on a user

Discussions about CSEntry
Forum rules
New release: CSPro 8.0
Post Reply
pierrew
Posts: 47
Joined: August 8th, 2012, 5:20 am
Location: Pohnpei, Federated States of Micronesia

Modify a data file based on a user

Post 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.
Gregory Martin
Posts: 1777
Joined: December 5th, 2011, 11:27 pm
Location: Washington, DC

Re: Modify a data file based on a user

Post 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.
pierrew
Posts: 47
Joined: August 8th, 2012, 5:20 am
Location: Pohnpei, Federated States of Micronesia

Re: Modify a data file based on a user

Post 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
Post Reply