Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I am trying to implement a simple button to make a selection dynamically, but am trying to get my head around the "Select in Field" action.
I have 3 fields: CitizenID, ResidenceTown, WorkTown
I want to make the button to select only CitizenID where ResidenceTown = WorkTown.
Have tried the below but it isn't working.
Any tips would be great!
Hi Chay,
='(' & Concat(Distinct If([WorkTown] =[ResidenceTown] ,CitizenID),'|') & ')'
Have you tried making a simple flag in the script:
Load *
,If(ResidenceTown = WorkTown, 1, 0) as CitizenFlag
From Source;
Then in the Action tab Field you you write CitizenFlag and in the Search String 1.
Hi
My ResidenceTown and WorkTown fields are in different tables, hence I'm unable to use the Flag method
hi
you'll need to use an expression that creates a list on customers as an output
so you'll need to use in the search string something like
='(' & concat(aggr(if([WorkTown]=[ResidenceTown],CitizenID),CitizenID),'|') & ')'
Hi Chay,
='(' & Concat(Distinct If([WorkTown] =[ResidenceTown] ,CitizenID),'|') & ')'
Also, for more clarification the action Select in Field works like this.
You choose the Field and the Search String you can write the possible values from the Field.
For example in the Field you've written CitizenID. It contains data like (1, 2, 3, 4 and so on). In this case Search String means you have to write down the CitizenID like 4.
Thanks Tamil
Works well.
Hi Chay,
I forgot to mention one point. If your CitizenID contains any spaces like "ID 0001" then above method won't work. To be on the safer side, you can write like
='(' & Concat(Distinct If([WorkTown] =[ResidenceTown],Chr(34) & CitizenID & Chr(34)),'|') & ')'
This expression works in both the cases.
One more way of doing this is as follow: Hope this helps.....
='(' & concat( {<CitizenID={"=WorkTown=ResidenceTown"}>} CitizenID, '|') & ')'