Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I want to exclude an invoice number from the list box as default. but would like to use it when required .. is there a good way?
In the script:
LOAD
<your other fields>...,
If(InvoiceNumber=xxx,1,0) AS %Flag_HideInvoice
FROM....;
In the app, create a button or text box with a Select In Field action. Choose the %Flag_HideInvoice as the field, and as the value put:
If(only(%Flag_HideInvoice)=0,'',0)
This will then toggle between all invoices and the non-hidden ones only.
Hope this helps,
Jason
did you tried select excluded option in properties?
or may be
=aggr(Only({1-$} FieldName),FieldName).
If this will always be the same Invoice Number, you can create a button that sets/resets an include/exclude variable, and create a listbox that either shows all field values or only those that are different from that specific Invoice Number.
While this may be an answer to your question, it won't do much in the remaining part of your document. That Invoice number will still show up in charts and tables. Can you elaborate on why you need this behavior?
Peter
hi chanty,
where should this be added?
hi peter.
Yes it is only one invoice number.. i cannot give a you a sample app as it is abig file.. can u give me more details?
Do you only want to hide it from the list box or do you want it excluded from all calculations too? I.e. Should Sum(Sales) include or exclude this invoice? If you only want to hide it then you need to use an expression in the list box like the example above, or If(InvoiceNumber<>'xxx',InvoiceNumber).
If you want this invoice excluded from all calcs by default is create a flag field on all invoice numbers where this one is 0 and all others are 1. You can then select/lock/hide this flag field as required.
Hope this helps,
Jason
Have you tried this on listbox expression
=If([invoice number],If([invoice number]<> '127448363',[invoice number]))
May be like in the attached qvw.
hi jason,
yes i like to have as u mentioned.. I want to hide it as default and should be excluded from all calculations ..and for some users i would like to give an option so once they select the invoice gets included and for all calculations also it should be taken into account
can you let me know how to achieve this
In the script:
LOAD
<your other fields>...,
If(InvoiceNumber=xxx,1,0) AS %Flag_HideInvoice
FROM....;
In the app, create a button or text box with a Select In Field action. Choose the %Flag_HideInvoice as the field, and as the value put:
If(only(%Flag_HideInvoice)=0,'',0)
This will then toggle between all invoices and the non-hidden ones only.
Hope this helps,
Jason
Did you try this?
Simply add a expression to your LB instead of field name like this?
If(InvoiceNumber<>'123', InvoiceNumber)