As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.
Join the TIBCO Community TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.
From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
Request access to the private WebFOCUS User Group (login required) to network with fellow members.
Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.
I am passing a multi select parameter to MAINTAIN and getting it as IWC.GetAppCGIValue. The value is stored in a variable in form 'BELLEVILLE', 'BRACEBRIDGE' , 'BRAMPTON'.
How can I use a where clause in For Statement to populate a stack for multi select variable.
For example -
This works For all next branch_product_details.BRANCH_PRODUCT_DETAILS.ID into BPD where Branch in ('BELLEVILLE' OR 'BRACEBRIDGE' OR 'BRAMPTON');
But this fails - Declare myBranches / A255 = IWC.GetAppCGIValue("whichBranch"); For all next branch_product_details.BRANCH_PRODUCT_DETAILS.ID into BPD where Branch in (myBranches);This message has been edited. Last edited by: Kerry,
There are two easy ways of doing this. The first is Maintain and the second is Table.
Maintain: Assume the selected branches are in BRANCHSTK. You can do this:
Stack clear BPD Compute i/i3=1; Repeat BRANCHSTK.FOCCOUNT Reposition branch_product_details.ID For all next branch_product_details.ID into BPD(bpd.foccount+1) Where Branch_product.branch eq branchstk(i).branch; Compute i = i + 1; Endrepeat
This loops through the selected branches and each time gets the information from the database.
The second technique passes the selected values as a string to TABLE and uses them in the WHERE clause. Just be careful. If the user can select TOO many values, you run the risk of exceeding the max size of the WHERE clause:
CASE GETDATA COMPUTE I/2=2; IF OUTSTK.FOCCOUNT GE 1 THEN BEGIN COMPUTE VAL/A300=" ' " || OUTSTK(1).CAT || " ' "; IF OUTSTK.FOCCOUNT GT 1 THEN BEGIN REPEAT OUTSTK.FOCCOUNT-1; COMPUTE VAL = VAL || " OR ' " || OUTSTK(I).CAT || " ' "; COMPUTE I=I+1; ENDREPEAT ENDBEGIN ENDBEGIN STACK CLEAR MOVSTK EXEC MULTI1 FROM VAL INTO MOVSTK ENDCASE
In the Table have:
TABLE FILE MOVIES PRINT MOVIECODE TITLE BY CATEGORY WHERE CATEGORY EQ &1 ON TABLE PCHOLD END
Either one should be good for you.
Mark
Posts: 663 | Location: New York | Registered: May 08, 2003