code factoring and so on

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
tkilshaw
Posts: 170
Joined: Thu Jan 19, 2006 11:33 pm
Location: Western Canada
Contact:

code factoring and so on

Post by tkilshaw »

I want to choose Accounts from a list and assign all the selected Accounts to a specific RegularUser.

I know that a PICK FROM action will do that, and presumably put all selected accounts into the Context.

Object RegularUser defines my users. The LoginName attribute is fine for my purposes.

So I need to display a form that allows the user to select the RegularUser.LoginName from a popup menu.

I'm unsure about:

1) where that form should reside. Neither Account nor RegularUser feel right.

2) also should I display the PICK FROM list first and then the form to select the LoginName to assign the account to. Or vice versa?

Or is there a better way to do this?

thanks,

Terry
aware_support2
Posts: 595
Joined: Sun Apr 24, 2005 2:22 am
Contact:

Post by aware_support2 »

Terry,

If you want to allow the user to link chosen accounts to chosen people the easiest way would be to have a couple of matching attributes Account.Person and RegularUser.Accounts. Then the user can simply click the Add From List button for the attribute on either Account or RegularUser form. The system will automatically display the list of objects to choose from, and when the user selects the desired items the system will create the links automatically. This is the standard system functionality and no additional forms or code is required.

If, for some reason, you want to accomplish this without using object forms you can add a process with the following 3 rules in it:

PICK FROM 'Regular Users For Selection'
PICK ONE OR MORE FROM 'Accounts For Selection'
Account.Person = RegularUser

Here 'Regular Users For Selection' and 'Accounts For Selection' are the names of queries looking for objects RegularUser and Account respectively that you will need to configure. At run-time when the process is started the system will first display a list of people for the user to make a selection, and then a list of accounts for selection. The third rule assigns the selected user to each selected account.

Please let me know if this answers your question.
Aware IM Support Team
tkilshaw
Posts: 170
Joined: Thu Jan 19, 2006 11:33 pm
Location: Western Canada
Contact:

Post by tkilshaw »

I figured out the latter approach and it works OK for me.

thanks,

Terry
Post Reply