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.
New TIBCO Community Coming Soon
In early summer, TIBCO plans to launch a new community—with a new user experience, enhanced search, and expanded capabilities for member engagement with answers and discussions! In advance of that, the current myibi community will be retired on April 30. We will continue to provide updates here on both the retirement of myibi and the new community launch.
What You Need to Know about Our New Community
We value the wealth of knowledge and engagement shared by community members and hope the new community will continue cultivating networking, knowledge sharing, and discussion.
During the transition period, from April 20th until the new community is launched this summer, myibi users should access the TIBCO WebFOCUS page to engage.
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.
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.
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
then in the maintain:
EXEC carstack into Stack1;
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