Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a list box with an expression to list only certain field names. I want that list to stay static (not resorted when selection is made). I'm using the sort expression with the following formula:
=if(Market_Data.Scenario='Actual',1,
if(Market_Data.Scenario=$(vCurLBEScenario),2,
if(Market_Data.Scenario=$(vPrevLBEScenario),3,
if(Market_Data.Scenario='Plan-16B',4,
if(Market_Data.Scenario='Standard-16',5,
if(Market_Data.Scenario='LBE_Feb',6,
if(Market_Data.Scenario='LBE_May',7,
if(Market_Data.Scenario='LBE_Aug',8,
if(Market_Data.Scenario='LBE_Nov',9)))))))))
If nothing is selected the order is acroding to this formula. Once a selection is made the order changes. I dont want that. I do not have any other sort method selected.
May be this:
=if(Only({1} Market_Data.Scenario)='Actual',1,
if(Only({1} Market_Data.Scenario)=$(vCurLBEScenario),2,
if(Only({1} Market_Data.Scenario)=$(vPrevLBEScenario),3,
if(Only({1} Market_Data.Scenario)='Plan-16B',4,
if(Only({1} Market_Data.Scenario)='Standard-16',5,
if(Only({1} Market_Data.Scenario)='LBE_Feb',6,
if(Only({1} Market_Data.Scenario)='LBE_May',7,
if(Only({1} Market_Data.Scenario)='LBE_Aug',8,
if(Only({1} Market_Data.Scenario)='LBE_Nov',9)))))))))
please post sample app
regards
Marco
May be this:
=if(Only({1} Market_Data.Scenario)='Actual',1,
if(Only({1} Market_Data.Scenario)=$(vCurLBEScenario),2,
if(Only({1} Market_Data.Scenario)=$(vPrevLBEScenario),3,
if(Only({1} Market_Data.Scenario)='Plan-16B',4,
if(Only({1} Market_Data.Scenario)='Standard-16',5,
if(Only({1} Market_Data.Scenario)='LBE_Feb',6,
if(Only({1} Market_Data.Scenario)='LBE_May',7,
if(Only({1} Market_Data.Scenario)='LBE_Aug',8,
if(Only({1} Market_Data.Scenario)='LBE_Nov',9)))))))))
Yes, that's the answer. Thanks
Can you describe what this does? Thanks
We are using the {1} to tell your sorting expression to not change based on any selection. But the problem is that you can not use it with bare field, you can only use it between functions such as Sum, Median, Avg, Only etc and having a bare field is equivalent to having a only next to it. So for instance :- FieldName = Only(FieldName), but with the Only(FieldName) you can use set analysis, but with FieldName you cannot.
So I just added this to your expression -> Only({1} Market_Data.Scenario) anytime you had Market_Data.Scenario
I hope this will help.
Best,
Sunny