2025 Mar 12 5:54 PM - edited 2025 Mar 12 5:55 PM
Hello, I'm new to SAC and still learning how it works and I,ve stumbled upon a headscratcher.
I have a requirement where, in a table with multiple rows and columns, I'd like to display Field1 if the country filter value is set to Canada, and Field2 if the filter is set to US. All other fields in the table would be the same.
The filter is an All Pages filter.
I think this is feasable leveraging scripting, but I'm not sure how to go about it, any help would be appreciated.
Thank you!
Request clarification before answering.
Its not clear on where you want to display the field when you say "I'd like to display Field1 if the country filter value is set to Canada, and Field2 if the filter is set to US. All other fields in the table would be the same. "
Assuming you want to display as Information you could try the below approach.
1. Use getDimensionFilters of Filedatasource to read the story filter values ( US or Canada)
FileDataSource.getDimensionFilters(dimension: string|+DimensionInfo)
2. Once you have read and stored the value assign the required value in a variable using a simple IF statement. Once assigned to variable you could assign it to a dynamic Text variable and show it as information.
Hope this helps !
Nikhil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
11 | |
8 | |
8 | |
6 | |
6 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.