My main form contains a hidden field ( text field )called: Test_Nr. It is computed and it’s default value is “”.
Also, the form contains one subform which have numerous fields because, in other words, the form contains 2 types of document: Doc A and Doc B. There are some “common” fields which Doc A and Doc B are having.
The are some fields on the subform ( which is contained by the main form ) that, together, create the DOC A, and some other fields that create DOC B.
I have two views. I want the first view to have an action for opening the form to get the Doc A and a view that has an action to open the form for Doc B.
My first view action code is :
@Command([Compose];“(fmMain)”);
@SetField(“Test_Nr”;“01”);
Those numerous fields that I want to appear in Doc A have at the hide-when formula:
@If(“Test_Nr”=“01”;@False;@True)
For the second view, the action code is :
@Command([Compose];“(fmMain)”);
@SetField(“Test_Nr”;“02”);
and the hide-when formula for fields that compose the doc A is:
@If(“Test_Nr”=“02”;@False;@True).
In other words, on clicking the 1st view action, I want to obtain DOC A. ( the fields that are not from DOC A, to be hidden ) and when clicking on 2nd view action to obtaion DOC B ( the fields that are not from DOC B, to be hidden ).
If I click the action on the 1st view: the Test_Nr value is “” if I click the action on the 2nd view the Test_Nr value is “”, also. So, the form is empty …
Please help me, this issue gives me some headache. Thanks