I’m trying to come up with a view selection formula but am unsure whether this is even possible. Here’s the scenario. Two different forms (FORM A and FORM B) share a common field (CLASS_ID). FORM B has a STATUS field but FORM A does not.
The view should contain:
(1) all FORM B docs where STATUS = “Approved”
(2) all FORM A docs where CLASS_ID matches
CLASS_ID on the FORM B docs in (1).
I’d appreciate any suggestions.
Thanks.
Subject: You can not (until R7) write a selection formula that depends on another document in the db.
Subject: View Selection Formula
Just did something similar to what you want, the following are my findings:
-
It is not possible to select Form A docs base on Form B’s STATUS.
-
Alternative way I took is categorize and sort them, put the un-wanted Form A documents at the bottom of the view.
Here is the categorized and sorted column you can consider if you want to try:
strList:=@If(CLASS_ID!=“”;CLASS_ID;“”);
strList:=@Trim(strList);
@If(strList!=“”;strList;“Z-N/A”)
Bill
Subject: View Selection Formula
You’re going to have a hard time trying to normalize your data like that. You’ll have to pass the “Approved” status through to the child docs (Form A’s - I’m assuming they are child docs) and then just use the status logic you used for Form B on both forms.
There’s no way to get one list of docs in a view selection formula and then use some value in those docs to select further docs.
On the other hand, once a document is open, you could display all the Form A’s with matching ID’s on the document using @DBLookup. You just wouldn’t see them in the view.
HTH, Matt