palantir-foundryfoundry-workshop

How can i change the content of a section if my scenario variable has nothing to return?


I have the above variable which displays property list based on the scenario that is active/selected. My use case is to display it as "no scenario" or something user friendly when there is no scenario available. Since this is object backed scenario variable, I am not able to customise anything.

enter image description here

Any advice would be great help!

[edit1] I was thinking of some approaches to set a default scenario to which the variable can fallback to if there is no specified scenario. But since the data is being picked from the 'Load data from scenario' this is tricky. technically the Backing data source doesn't have any data in itself, its just used for structural purposes.

Any advice would be great help!


Solution

  • So how i solved this was, i created two seperate sections and created 2 variables based on a variable 'X'. so if X is empty display one section (collapse the other) And vice versa. I didnt give any section header and this helped solved a lot of things. Thanks