(imported topic written by Pol.o.Currain)
Hi guys,
I have a question - how can I use a value I get from one object to look up another?
I’ll show you what I mean:
Let’s say I have an action on the system whose name contains the ID of another action, and I want to write a single query to return me details about both, how would I do that? I quickly run into the issue of nested "it"s (where I can’t use the “it” for the name of the action in the whose clause for the second lookup)
e.g.
Let’s say I have an action whose ID is 123, and it’s name is “456” (I’m just going to say for convenience sake that the name is purely the ID of the “other” action to save on parsing, but it would probably contain some text as well).
I want to write a query that will return me the name of the action that is doing the referencing (i.e. “456”), and also the name of the action with the ID 456.
If I try to do something like this, the “it” always refers to the object to the left of the nearest “whose” clause:
(
name of bes action whose( id of it = name of it), name of it
)
of bes action
whose
(
id of it = 123
)
I’m guessing this is just a limitation, but asking the question anyway in case there’s a pattern I can follow here to achieve this.