fgoya wrote:... but thought that it might be some other easier way.
....while I wait for more brand new ideas....
You create a dummy attribute as a lookup - one per "thing" that you want to display - set the attribute to default to "1", apply the default to all existing values and make it enter-once.
You create the parameterised NSQL lookup, that takes the object id as a parameter and executes some clever SQL (this is where the "anything" comes in) and returns the "anything" as the display text and always returns "1" as the key value.
(Obviously you need to create the lookup before you create the attribute!)
Then you can place that attribute onto your general page - the underlying value will always be "1", it will always be read-only (since you have set it enter-once) but the display-value will be dynamically derived based on your clever SQL.
So in your "financial" example, you could build something that took the resource id and retrieved the relevant details from the DB (since you know where they are) to display on the screen.
(I've posted about this before somewhere on the boards)
EDIT : this is where I tried to explain it before (a while ago now :mellow: !!) Dynamic Query Lookup
flogoya wrote:I'm having a very hard time understanding your explanation. I know it is very complete and it seems to be very well explained, but still I'm not getting it, sorry :(
flogoya wrote:Let me explain far more my situation: I have 5 dependant lookups. For the first four, I created a custom object where I associated values from lookup1 with values from lookup2. Then for dependant lookup3 I created a new custom object where I associated values from lookup2 with values from lookup3, and the same I did with lookup4.
Now the only lookup left that I have has only two values: Critical - Not Critical. But I have to associate these with the lookup4, which has more than hundreds of values.
flogoya wrote:My questions:
1. I should first create a parameterised NSQL lookup (I understand a dynamic lookup) that would take the object id as a parameter and would execute sql and returns anything as the display text and always returns 1 as the key value. - I don't understand this. Definitely I got very confused trying to relate this with my situation.
flogoya wrote:2. When you say: 'create a dummy attribute as a lookup - one per "thing" that you want to display -' do you mean I need to create a dummy attribute for 'Critical' and another one for 'Not Critical'?
flogoya wrote:If I want an NSQL to show any value on a dynamic lookup I need to have this value already on the database, right? I mean, I would onlbe doing a selection and placing it on a field on the general project properties (for instance)
flogoya wrote:My main problem is that I don't have this association already made. I only have the values from the previous lookup, and based on the value selected, Clarity would determine if it is critical or not.
flogoya wrote:I tried using a process but I don't know how to set the condition since when I want to select the values from the lookup (lookup4) this one is a dynamic lookup and the list of values is not displayed.
flogoya wrote:I'm only trying to avoid to create a custom object just to make the match between hundreds of values with its respective state: critical or not critical.