Automatically generated Drop Down boxes

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
Jolee
Posts: 24
Joined: Wed Nov 09, 2005 3:55 am

Automatically generated Drop Down boxes

Post by Jolee »

Hi,

I want to create a new form to log jobs with.

Is it better to create a new Business Object?
If so, how do I get the Form to automatically generate the data for my drop down boxes.

eg.
On the form I would like to show
Distributor [drop down box of all distributors in system; Distributor is BO]
Client [drop down box of all clients associated with the distibutor; client is BO]
Property [drop down box of all properties associated with client; property is BO]

New information relating to job .. Job No, Date entered etc.

Please advise the best way to insert this information ...

cheers
Jolee
aware_support
Posts: 7525
Joined: Sun Apr 24, 2005 12:36 am
Contact:

Post by aware_support »

Jolee,

I will use Distributor as an example, as others will be similar.

Job will have a reference attribute to a Distributor called "Distributor" (multiple not allowed). To get Aware IM to display a drop down with all existing distributors, open the Distributor attribute of the Job for editing, go to the Presentation dialog and select "Drop down" radio button instead of the default "Table of items". At run time Aware IM will automatically populate this drop down with all existing distributors.

Best Regards
Aware IM Support Team
Jolee
Posts: 24
Joined: Wed Nov 09, 2005 3:55 am

Post by Jolee »

Okay so now I have a drop down box.

But how can I get drop down box for Property to be only properties relating to the Client I picked?
Is this possible?
I have tried creating a filtered query but it did not work.

Please advise,
Jolee
aware_support2
Posts: 595
Joined: Sun Apr 24, 2005 2:22 am
Contact:

Post by aware_support2 »

Jolee,

> I have tried creating a filtered query but it did not work.
It is the right thing to do to have a query with a condition like 'Property IN Client.Properties' for filtering available values for the Property attribute. The reason it did not work is that drop-downs on forms are not dynamically updated if an attribute on which their query depends is updated without living the form. In other words, when you select a different client from the Client dropdown, the list of properties in the Property dropdown is not updated.

You have two options. One is to use the Table Of Items presentation for Client and the Dropdown presentation for Property. When you select a client on a separate page, the Property dropdown will be updated when you return to the original page.

The other option is to continue to use the Dropdown presentation for both attributes, but place the attributes on separate sections of the form. Then you can select a client on one section and switch to the other section to see the updated list of properties for the client. Note that multi-section forms support two navigation styles: tabbed and wizard. The latter style is especially useful for creating new objects when the user is guided through a sequence of form sections. This way a distributor can be selected on the first section from a dropdown, a client on the second from a dropdown filtered on distributor, and a property on the third from a dropdown filtered on client.

You can also define different forms for creation and editing a business object, so that the system uses a wizard-like form for registering new objects and a tabbed (or a single-section) form for viewing/editing existing objects.
Aware IM Support Team
Jolee
Posts: 24
Joined: Wed Nov 09, 2005 3:55 am

Post by Jolee »

This is still not working for me.

A process is used to start the job logging process by using the Distributor as the available input type.

Then I get a list of Clients from the Distributor.
I cannot seems to get a list of Properties for the Client.

I have changed it so that I am using the Wizard style navigation.

The filter query is: FIND Reveal_System WHERE Reveal_Sytem IN Client.Reveal_Systems

This finds no Reveal Systems for my drop down box (which is on the next page of the wizard to Client).

Then I want to find Properties from the Reveal_System which has the same setup.

Is my query wrong?

Does it matter that my attributes are Peers to their actual BO type.
Client is 'Owned By' as I want to relate the Job to Client.
But the Reveal System attribute of Job is Peer to the actual BO of Reveal System.

Please advise,
Jolee
aware_support
Posts: 7525
Joined: Sun Apr 24, 2005 12:36 am
Contact:

Post by aware_support »

I suspect the problem is that reference to Client in your filter query does not start with the Job object. All objects in filter queries have to be referred via the Job object since this is the object your are entering.

Try replacing Client in your query with Job.Client (if Job has a single reference to a client). Also check out the log and the server output to see if there are any problems reported there.
Aware IM Support Team
Post Reply