Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi There
I have a list box that I need to limit what selections are available.
I need to force the listbox to look at a one of the Descriptions= "Expenses"
I cant use an if statement in this case , if there is no selection then the listbox will display everything
Im assuming I should use the getselections function in some way...
Basically what I am trying to do is if(Description='Expenses',Cost_Centre) - this would only work if Expenses is selected.
How do I force it to look at Expenses and Display the Cost Centre?
Thank you
Like this?
if(GetFieldSelection(Description)='Expenses',Cost_Centre)
Hi Treseco
I see that also only works if you select the field expenses... how can I get it to display only the cost centers for expenses by default...
Why don't you create a Hierarchic group and place that group in the list box?.It seems like if you click Expenses on the list box you want to show all the child of expenses ?
Ideally, 'if(Description='Expenses',Cost_Centre)' should work in listbox. Can you post a sample qvw?
Hi,
I think it is better to bring a new field in script, then it would be easier in front end
LOAD
*,
If(Descriptions= 'Expenses', CostCenter) AS NewField
FROM DataSource;
Now use NewField as a dimension in Listbox. Using expressions in listboxes is not a good practice.
Regards,
Jagan.
The normal if statement does work but it seems to be giving me blanks in the list box which doesnt make sense
Description is a field from the UDR ... do you think this could be messing my model up a bit?
Thanks Jagan
But i think based on the Set up of my model I have know choice but to use the expression...
Hi,
Try like this
List box -> Field -> Select Expression and give-> =If(WildMatch(Description, 'Description'), Cost_Centre)
If this is not working then attach sample file.
Regards,
Jagan.
Hi,
If you got the answer please close this thread by giving Correct Answer to the useful post.
Regards,
jagan.