Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
hammermill21
Creator III
Creator III

GetFieldSelections question

Hello!

I am creating a variable for when a building is selected. My expression for my building filter is: 

=Trim(Upper(Replace(building, '_', ' '))) & Trim(Upper(Replace(enter_building, '_', ' '))), now I"m trying to create a variable for GetFieldSelctions using my building expression but it doesn't work. 

Any ideas?

 

Thank you!

22 Replies
hammermill21
Creator III
Creator III
Author

Hey Sunny,

That is not working either when I select a building nothing happens. 

sunny_talwar

I guess you have building and enter_building both in your selection box... why do you need both? can you not create a new field in the script using your logic

Trim(Upper(Replace(building, '_', ' '))) & Trim(Upper(Replace(enter_building, '_', ' '))) as NewBuildingName

and then use this in your filter object with this expression for KPI

If(GetSelectedCount(NewBuildingName) = 1,
Concat(DISTINCT NewBuildingName),
'All buildings are reflected in the data below unless a building filter is selected')

or this

If(GetSelectedCount(NewBuildingName) > 0,
Concat(DISTINCT NewBuildingName),
'All buildings are reflected in the data below unless a building filter is selected')
hammermill21
Creator III
Creator III
Author

Hey Sunny,

I was finally able to do it, I changed the script and added: If(GetSelectedCount(NewBuildingName) = 1, Concat(DISTINCT NewBuildingName)) as per your example and now it's finally working. I was trying to display a message under data handling and I think I was messing it all up. Either way, it's working now. 

THANK YOU!