Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
ALERT: QlikView server communication interruptions following Microsoft Windows Domain Controller security updates
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Auto selection on sheet open - First of Possible Values

Hi,

How can be defined that on a sheet activate event the first possible value of a specific field should be initially selected.

I was trying to go through the Sheet Settings - Triggers but didn't succeed.

Appreciate all the help you can give

Regards

Joao

Labels (1)
1 Solution

Accepted Solutions
Not applicable
Author

For the Sheet, set the OnActivate event to use a macro like this:

Sub Selector
set fld = ActiveDocument.Fields("FIELD")
set val = fld.GetPossibleValues
fld.Select val.Item(0).Text
End Sub


I'm not sure if you can select the first possible using a trigger. You could probably create a variable that holds the first possible and then select using that. I'm back on 8.5, so I've been unable to use triggers for a while.

View solution in original post

3 Replies
Not applicable
Author

For the Sheet, set the OnActivate event to use a macro like this:

Sub Selector
set fld = ActiveDocument.Fields("FIELD")
set val = fld.GetPossibleValues
fld.Select val.Item(0).Text
End Sub


I'm not sure if you can select the first possible using a trigger. You could probably create a variable that holds the first possible and then select using that. I'm back on 8.5, so I've been unable to use triggers for a while.

Not applicable
Author

Hi Miller,

Thank you for you promptly help.

The solution fits perfectly and the issue is solved.

Regards

Joao

Not applicable
Author

Hi Miller!

Hope you can give me some solution for me here.

http://community.qlik.com/forums/t/24345.aspx