I have a straightforward selection formula:
SELECT Form=“PO” : “InvRec” : “PI” & SaveFlag !=“No” & Status = “Refer to Branch”: “Awaiting Authorisation”
I have a document where:
Form = “InvRec”
Status = “Refer to Branch”
SaveFlag = “Yes”
Shouldn’t this appear in the view? I’m not familiar with using “:” in view selection formulas, could this be causing the problem?
I haven’t written this and instead of using “:” I tend to write it in full ie form = “xxx” | form = “yyy” | form = “bbb”.
Cheers for any help,
Katherine
Subject: It is probably the != part. Try using ()'s:
SELECT (Form=“PO” : “InvRec” : “PI”) & (SaveFlag !=“No”) & (Status = “Refer to Branch” : “Awaiting Authorisation”)
Subject: RE: It is probably the != part. Try using ()'s:
Nope, doesn’t make any difference. It seems to only pick up the ‘PO’ forms.
Subject: View select formulas - help
Conducted simple test using your formula and it appears to work fine. Trying the following:
Select Form = “InvRec” & SaveFlag != “No” & Status = “Refer to Branch”
If the document doesn’t appear, then something else is going on…
Subject: View select formulas - help
just a few guesses:
Normally, with the information you gave, the document should be included in the view.
Could it be that some of the fields are multivalue? In that case, you should use *= instead of =
for example, if the status field can hold multiple values, use this selection formula :
SELECT Form=“PO”:“InvRec”:“PI” & SaveFlag !=“No” & Status *= “Refer to Branch”:“Awaiting Authorisation”
(I allways use the *= comparison in such formulas)
I suppose the spaces between the quotes (") and the colons (
ore inserted for clarity? The shouldn’t be there in your formula.
No response hierarchy involved? Uncheck the ‘show response hierarchy’ property of the view.
Regards,
Joris
Subject: RE: View select formulas - help
None of the fields are multivalue. All the documents are doc type ‘Document’ rather than response documents and the ‘Show response documents in hierarchy’ is ticked.
If I change the status in the doc with the PO form, it shows up in the view. This leads me to think its only checking for docs with the form ‘PO’ and not looking for docs with the forms ‘InvRec’ or ‘PI’?
Regards,
Katherine
Subject: RE: View select formulas - help
The selection formula really should work as it is, so I’m thinking more of a typo soewhere …
Selection formula’s are case sensitive, so are you sure then The form field contains ‘InvRec’ and not ‘invrec’ or something similar? Or that there is a mixup between the ‘l’ (=small ‘L’) and the ‘I’ (=capital ‘i’)?
You could try this formula to make sure there are no typo"s involved.
SELECT (@Trim(@LowerCase(Form)) *=“po”:“invrec”:“pi”) & SaveFlag !=“No” & Status = “Refer to Branch”: “Awaiting Authorisation”
If the document shows up with this formula, then you know where to look …
Good luck with it …
Joris