Jump to content
Server Maintenance This Week. ×

IWP Accounts


SM76

This topic is 5269 days old. Please don't post here. Open a new topic instead.

Recommended Posts

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

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

This topic is 5269 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.