Query with parameters from another Object

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
ACDC
Posts: 1142
Joined: Sat Jun 30, 2007 5:03 pm
Location: California, USA

Query with parameters from another Object

Post by ACDC »

Hi

I am trying to set up a query that gets its parameters from another OBJECT when in context.

I want to change this query:
"FIND Appointment WHERE Appointment.Type='Meeting'"

to something like:
"FIND Appointment WHERE Appointment.Type=Report.Type"

In the Report Object, the attribute "Type" has an option 'Meeting'

Is this possible ? as I cannot seem to come up with the right rule syntax

Thank You
tford
Posts: 4238
Joined: Sat Mar 10, 2007 6:44 pm

Post by tford »

ACDC,

Yes, this should be possible.

Perhaps you can explain more about how you are trying to do it. Is this Find.... syntax in a query? How/where is the context formed?

Tom
ACDC
Posts: 1142
Joined: Sat Jun 30, 2007 5:03 pm
Location: California, USA

Post by ACDC »

Tom

Yes, the Find.. is in a query that is part of a rule in a process that is in an Object and accessed from the program bar when in edit view


When the user is in edit view of a record there is an option on the program bar "Generate List" that runs the query and inserts the result of the query in the reference attribute 'Appointment" of the current object in edit

The parameters of this query are obtained from the contents of the attributes in the record being edited.
tford
Posts: 4238
Joined: Sat Mar 10, 2007 6:44 pm

Post by tford »

ACDC,

Assuming you have a reference attribute Report.Appointments, you should be able to have the form that Edits a Report instance call a process.

That process would have Report as a process input and have a rule as follows:

FIND Appointment WHERE Appointment .Type=Report.Type
INSERT Appointment IN Report.Appointments

You do not need a query. The FIND action will be part of a process.

Does that help?

Tom
ACDC
Posts: 1142
Joined: Sat Jun 30, 2007 5:03 pm
Location: California, USA

Post by ACDC »

Tom

Yeah , thanks I got it working
Post Reply