Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Clear field with macro after clearing other field

Hi guys,

I want to put some trigger that do that thing:

When I clearing (Only Clearing!) some field, I want to run some macro that will clear the same field but with Alternate State.

Thanks!

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

You don't need a macro for this.

In the Document Properties, go to the Triggers tab.  Assign action to your field (let's call it YourField heer).  Action should be assigned on "OnSelect", and the action is "Clear Field".  In the field, enter this expression:

=if(GetSelectedCount(YourField)=0, 'YourField')

And, right here, in the action property, select your AQlternate State in drop-down.

I've tried - it works.

View solution in original post

3 Replies
Anonymous
Not applicable
Author

Macro can be triggered by a change in the first field.  Logic in the macro would be something like this:
- check if there are selections in the field

- if there are no selections, clear the field in the alternate state

- if there are selections, do nothing.

Not applicable
Author

All this logic steps need to be written on VB?

Can you help me with this please?

Anonymous
Not applicable
Author

You don't need a macro for this.

In the Document Properties, go to the Triggers tab.  Assign action to your field (let's call it YourField heer).  Action should be assigned on "OnSelect", and the action is "Clear Field".  In the field, enter this expression:

=if(GetSelectedCount(YourField)=0, 'YourField')

And, right here, in the action property, select your AQlternate State in drop-down.

I've tried - it works.