Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set field to multiple values, based on an expression, through an action button?

Can I set a field value equal to a list in an action? 

For example, if I have 5 properties, and I've assigned these properties flags. I want to create a button so that when the user clicks the button, the action will assign the field with the properties which have a flag of '1'. 

So if my data looked like this:

Prop     Flag

Prop1     1

Prop2     1

Prop3     0

Prop4     0

Prop5     1

When the user clicks the button, I'd like the field 'Prop' to equal Prop1 and Prop2 and Prop5.

As an added twist...I'm not assigning these flags in the script.  They would be driven by an if statement which assigns the flag based on whether or not the property has data for all of the given years that user is trying to see.  (I'm doing this so that if the user wants to see a spread of 3 years, and one of the properties only has data for one of those 3 years, it would exclude the property...a way to normalize the numbers...)  I've got my formula working fine for that, so I'm able to identify which properties I'd want the user to see when they click the button, but I'm stuck on how to set the field equal to multiple values based on the result of another formula.

I tried to keep this basic, without my own field names and such, just to avoid confusion, but if you need more detail to solve, let me know.

Or if you have another idea of how to accomplish this, that would be great as well!

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

You can use action ToggleSelect, with the field Prop, and serach string, before considering your "twist"

='(' & Concat({<Flag={'1'}>} Prop, '|') & ')'

I'm not sure what it means "I'm not assigning these flags".  Most likely you need to replace the 1 in set with something that reflects your logic.  Hope you'll figure out.

Regards,

Michael

View solution in original post

3 Replies
Anonymous
Not applicable
Author

You can use action ToggleSelect, with the field Prop, and serach string, before considering your "twist"

='(' & Concat({<Flag={'1'}>} Prop, '|') & ')'

I'm not sure what it means "I'm not assigning these flags".  Most likely you need to replace the 1 in set with something that reflects your logic.  Hope you'll figure out.

Regards,

Michael

Not applicable
Author

Thanks Michael that worked. I skipped the set analysis and did this:

  ='(' & Concat( if(aggr(MyFormulaToGetFlag,Prop)=1,Prop),'*I*') & ')'

And set an action to set my property field to equal that.

Not applicable
Author

hello team

   I need to use the set analytics in this. how can I use this.

='(' & Concat({<Flag={'1'}>} [sale]::Prop, '|') & ')'

This is not working.  I need a particular place only have to select say for example Monday,tue only have to select based on the selection

can any one help.