Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
hugmarcel
Specialist
Specialist

Use button action to set Field value to an expression

Hi

I have a button with an action to set field theField1.

Field1 shall be set to value "=DATE(MAX(Sale_Date),'DD.MM.YYYY')".

The button works, however, in selection box i get specific value "03.02.2015", but I want to have the expression in the selection box.

So If i change another field in the app, Field1 shall be set to the max(sale_date) according to the new filter selection.

Thx - Marcel

13 Replies
hugmarcel
Specialist
Specialist
Author

Hi

I used QlikView CTRL -> QQ to create the example.

I want to use the "set field to expression by button action" as a feature that works in a general context. Not dependant on the data model. Thus, I like to have this working also with TransIDTest in a seperate table.

Marcel

marcus_sommer

I think the separate table isn't thes problem it's rather the key and the table should look like:

TransactionsExtra:

Load

TransID,

TransID AS TransIDTest

Resident Transactions;

- Marcus

swuehl
MVP
MVP

I am not sure what the use case of your requested functionality should be.

But it seems that the search expression in the selection box is not re-evaluated on every change in your selection state.

Maybe you can work around this with triggers, as already suggested above by Sunny.

See attached for a demo.

hugmarcel
Specialist
Specialist
Author

Hi

thank you. I agree, the re-evaluation does not seem to work, and thus the expression in the selection status.

I am now using Set Analysis expressions to set the max in my formulas directly. I do not like this as performace is worse than using a filter in data model.

Thank you again for your help!

Marcel