SM76 Posted November 30, 2009 Posted November 30, 2009 Good Day, I have a database of hazardous materials. Some of the fields include: owner, chemical name, quantity etc. I have also activated IWP for people to go in and change their own inventory (ingenious, I know). A log in script filters for their 'stock' only and then can add and delete or edit. Now: IWP Accounts (online privilege set based - restricted access) are created automatically through the 'owner' field. The PWs are created based on the owner field plus a numeric string. So far, everything's going great .. I'm wondering now how I can automatically delete such a user account, when his/her 'stock' goes to zero (aka. when no more records with their 'owner' name exist (owner field content == account name) .. Any ideas greatly appreciated. thanks, Mat
bcooney Posted December 1, 2009 Posted December 1, 2009 Interesting setup. Have you thought of using RLA to limit the records that they see, rather than a find? Capture Get(AccountName) into gAccountName in an open script and set the rule for view to gAccountName=Owner. If you had a Users table, then you could run a script (FM Server script) that checks for Users that don't have any related records User::AccountName=Inventory::AccountName, and delete the corresponding account. If their stock goes to zero, will it ever come back? Perhaps it would be better to disable the account than delete it?
SM76 Posted December 1, 2009 Author Posted December 1, 2009 thanks b, I'll work through your solution and see what I can come up with. I never considered using views rather than searches ... ingenious, so much to learn }:(
Recommended Posts
This topic is 5471 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now