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.
Hello, everyone. I'm just starting to get my feet wet with Maintain and have numerous questions. So far, this forum has been able to answer many -- thank you all!
I have come across something I'm trying to accomplish that should surely be quite simple, but I've yet to find the solution.
I've got a table with around 400 records that I'm using to populate a series of nested list boxes. For example: In ListBox1 when you click on one of the three "Error Types", it then populates ListBox2 with the "Error ID" from the table that relates to the ListBox1 selection. Then when a result in ListBox2 is selected, I load the corresponding "Error Description" records into ListBox3. This process repeats until the user is able to finally drill down to a unique "Error Root Cause" in ListBox4. (Hopefully that made sense). I'm currently populating my stacks with WF procedures and the "EXEC procedure INTO stack" command.
What I'm looking to do is prior to loading these stacks with the data from the source table, I'd like to first load a record into the stack that reads "---" so it'll appear at the top of List Boxes by default indicating to the user to select their choice. Wihtout this "dummy" entry, by default the first record in the stack is highlighted and may cause some confusion to the user as they didn't select it.
I know I can add the "---" entries to the source database but I'd like to stay away from that as it would require additional table maintenance. I also think I could add the "---" to the .fex that's generating the results but, to me, it makes more sense to put it in the actual Maintain procedure.
Any help/hints would be appreciated.
Thanks, Kelly
Kelly WF 7.6.6, Win 2K3 SP2, Tomcat
Posts: 19 | Location: SLC, UT | Registered: January 19, 2007
Hi Kelly This is very easy to do. What you want to do is start populating the stack at row 2 instead of row 1. However, there is an issue with the code, so we have to be a little creative. Here is the code:
INFER FIELDS INTO ERRORTYPESTK1 -* Real Stack INFER FIELDS INTO ERRORTYPESTK2 -* Temp Stack STACK CLEAR ERRORTYPESTK1 ERRORTYPESTK2 -* clear the stacks EXEC TABLE INTO ERRORTYPESTK2 -* Get the data STACK COPY FROM ERRORTYPESTK2 INTO ERRORTYPESTK1(2) -* Copy the data from temp stack into row 2 of real stack COMPUTE ERRORTYPESTK1(1).FIELD1 = '---'; -* Compute place holder
That's is. Load all the data into a temp stack and then copy it into the real stack starting at row 2. Then you can compute anything you want into row 1 of the real stack. The only thing you can't do it load the data directly from the EXEC into stk(2). That would be the easiest way, but it blows up. Sorry. I hope this helps.
Mark
Posts: 663 | Location: New York | Registered: May 08, 2003
-** Shift all the existing items down one, to make room for the new item Repeat (stkExample.Foccount - 1) Cnt = stkExample.Foccount; Compute stkExample(Cnt).Fieldname = stkExample(Cnt-1).Fieldname Endrepeat Cnt=Cnt-1;
-** Setup default field value for the new item Compute stkExample(1).Fieldname = 'Whatever' ;
I have a number of stack manipulation code examples Here for my reference but anyone else can use them too
TABLE FILE CAR
RANKED BY COUNTRY
ON TABLE PCHOLD
END
then in the maintain:
.
.
stack1.rank/i7;
stack1.country/a10;
.
.
EXEC carstack into Stack1;
x/i9=stack1.foccount+1
stack1(x).rank=0;
stack1(x).country='----------';
stack sort stack1 by rank;
.
.
then use country in a list box. (always use the x computed value, not foccount+1 in its place, as reference to foccount increases its value)
Alan. WF 7.705/8.007
Posts: 1451 | Location: Portugal | Registered: February 07, 2007