Focal Point
[SOLVED] Passing Form to Form Values - Maintain

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/294101253

January 26, 2010, 05:22 AM
gghlo1
[SOLVED] Passing Form to Form Values - Maintain
Hi All

Hope you can help me with this. I have form1 with HTMLTable populated from Stack1. I also have form2 with is supposed to populate stack2 and save it to the Database

I need to know how i can do the following:
When I click on form1, on my ClickLink event of the HTMLTable
(COMPUTE stack1.FocIndex = form1.HTMLTable.ClickRow;)
I need to send my stack1.FocIndex value to a textbox in form2 before I can save it to stack2.

Any help would be appreciated. I will crearify if this is not enough information.

working on:

WebFOCUS 7.6.9
Maintain 7.6.10

This message has been edited. Last edited by: Kerry,


WebFOCUS 7.6.9
Windows XP
Dev Studio 7.6.10
January 26, 2010, 07:54 AM
Maintain Wizard
Hi Godfrey
Ok. So the user makes a selection on the HTMLTable on Form1 populated by Stack1 and you want to pass the selected row number to form2 and Stack2?

To find out the row and value of the row that was selected, use:

Compute Row1/i3 = Formname.HtmlTablename.ClickRow;
Compute Row1Value/fmt = Stack1(Row1).Fieldname;
-* Here Formname is the name of the form and htmltablename is the name of the table.
-* Also, fmt is the format of the selected value and fieldname is the name of the field.

You can now use Row1 and Row1Value on form2. Either drag them onto the form or create a text box and use them as the values.

Mark
January 26, 2010, 11:21 AM
John_Edwards
quote:
Originally posted by gghlo1:

I need to send my stack1.FocIndex value to a textbox in form2 before I can save it to stack2.



You can create a field on your second form that is attached to the focIndex of stack1. It's one of the selectable items when you attach an input field to a stack value. That's step 1.

The clickrow attribute you're using allows you to set the value of your stack1 focIndex as MZ metioned above. Be sure be sure be sure to check the value of clickRow in JavaScript before making the jump to Maintain -- the hyperlink covers the entire cell but clickRow only seems to populate when you click on the text that is in the cell. If you click on the blank space clickRow could be empty, and it will appear that the trigger is not functioning correctly.

J.



January 27, 2010, 03:45 AM
gghlo1
Hi John and Maintain Wiz

Thank you both for your input, you were spot on on what I needed. MZ, in form1, i did create the two COMPUTES and assigned one of the COMPUTES the value of my stack1.Fieldname, which was made available in my second form and displayed in my textbox.

I then simply assigned that value to my stack2.fieldname before saving to the DB in stack2.

Thanks for the input, I am sorted.


WebFOCUS 7.6.9
Windows XP
Dev Studio 7.6.10