Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
oxiofrt
Partner - Creator
Partner - Creator

Possible to operate "Automatic" selection

Hi,

I would like to add a feature to the application herejoined.

The aim is to automatically select possible values in a field when changing the value of a variable.

If possible I would like to avoid macros.

Can you hlp ?

Thanks a lot

1 Solution

Accepted Solutions
jonathandienst
Partner - Champion III
Partner - Champion III

Hi

You need to override the current selection when calculating the search string for the select in field action. From tresesco's example, do this:

='('&Concat({1} if(DELAI >= $(Variable1),ID_INTERVENTION_SDIS),'|')&')'

HTH

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein

View solution in original post

12 Replies
israrkhan
Specialist II
Specialist II

you can do it, by adding a trigger,

Document properties>> triggers>> left down , locate variable event triggers, on change.

add a trigger >> select in field, and put your search string.

jonathandienst
Partner - Champion III
Partner - Champion III

Hi

Yes it is possible, and you can use actions for this rather than macros. But to help you, I need more concrete examples showing what the variable might contain and what should be selected when the variable changes to that value.

Regards

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
oxiofrt
Partner - Creator
Partner - Creator
Author

Well, I tried it, but it doesn't work.

Select in field doesn't allow you to specifiy an expression such as " select ID_INTERVENTION_SDIS where DELAI >= $(variable1).


israrkhan
Specialist II
Specialist II

off course it will not select, its a sql statement.

let us know what you want a select, and in which field, we will help to give to expression

oxiofrt
Partner - Creator
Partner - Creator
Author

Thanks a lot for your answer.

The application herejoined should help understanding the matter.

The variable contains an integer, which isthe value defined through the cursor.

Each fact (ID_INTERVENTION_SDIS) has a duration value (DELAI). I would like to automaticaly select the ID_INTERVENTION_SDIS where their DELAI is >= variable Variable1.

I don't kinow if a trigger on the variable may be useed. "Select in field" doesn't seem to be possible.

You may test it trough the .qvw joined to my post.


oxiofrt
Partner - Creator
Partner - Creator
Author

Thanks a lot four your answer

The application herejoined should help understanding the matter.

The variable Variable1 contains an integer, which is the value defined through the cursor.

Each fact (ID_INTERVENTION_SDIS) has a duration value (DELAI). I would like to automaticaly select the ID_INTERVENTION_SDIS where their DELAI is >= to the value of the variable Variable1.

I don't know if a trigger on the variable may be used. "Select in field" doesn't seem to be possible.

You may test it trough the .qvw joined to my post

oxiofrt
Partner - Creator
Partner - Creator
Author

of course I don't try to add sql statement in expression. But it seemd to me that was the best way to express that do not only want to search a search string but the possible values that are matching a condition.

tresesco
MVP
MVP

Please see the attachment.

israrkhan
Specialist II
Specialist II

I just prepared a sample for you,

but saw, Tresesco already uploaded sample, see thats working perfect...