Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community

At 02 FEB 1998 03:15:08PM B Cameron wrote:

I have a form that has an edittable. In column 1 of the edittable is a value that is a key to another table. I would like to set up a button or "Func" key that when "clicked" would display a popup of those keys currently on the form; then allow the user to select one of those values and then launch "that" tables form. Then, when that form is closed, return back to the popup to select another value, or cancel back to the original form. I wrote some code to do it for a single value…

declare function Dialog_Box

Parent=Get_Property(@WINDOW,"MDIFRAME")

isbn=.ISBN-]TEXT

if isbn then

 x=Dialog_Box('BOOKS', Parent, isbn)

end

RETURN 0

Any code samples, tips and/or hints?


At 02 FEB 1998 05:47PM Blaise (Revelation) wrote:

Bruce,

If I can understand you question correct this is what I might try.

If you get all the values in column 1 in that edit table and place them into a variable, @VM delimited. From code, display a popup with those keys in it using the following code.

$insert POPUP_EQUATES

declare function Popup

info =

Setup the popup to display the key values data =' data=info format=1:25:L::" convert ":" to @SVM in format data =format data =Popup Title" data =F" Launch the popup and return the key to retVal

retVal =Popup(@WINDOW , data)

The return value, retVal will hold the key to be used in the next form. You can then use this following code to pass it in.

Start the window Start_Window(, , , , '') Set the text property of the key field to the key that was returned

Set_Property(@WINDOW : ".KEYFIELD" , "TEXT" , retVal)

**Send the READ event to the form to see the data

Send_Event(@WINDOW , "READ")

On the close event for that window you can either start this procedure again or just give focus to the previous form.

I hope this didn't confuse you more than help. Let me know if you have anymore questions.

Thanks and good luck!

-Blaise


At 02 FEB 1998 05:52PM Aaron Kaplan wrote:

Get the array value instead of the text value, and pass in the information needed to the popup.

Once you get the key back from the popup, just pass in to DIALOG_BOX as your doing.

If you need to know how to create the popup, post back.

[email protected]

Sprezzatura, Inc.

www.sprezzatura.com_zz.jpg


At 02 FEB 1998 11:41PM B Cameron wrote:

Thanks Blaise,

That did help. How would I get just the hilighted value of a column/row and exclude the popup? I have been trying w/ the

Get_property and "COLDATA" etc. Also, when I use the Dialog_Box

function it is not passing the value to the next form.

Bruce


At 03 FEB 1998 09:14AM Blaise (Revelation) wrote:

Bruce,

If you want to get the key from the edit table you can use this method.

eTable=."

pos=Get_Property(@WINDOW : eTable , "SELPOS")

key=Get_Property(@WINDOW : eTable , "CELLPOS" , 1:@FM:pos)

You now have the key to pass to the Dialog_Box function. In the 3rd parameter pass this 'KEY' which will be accepted in the CREATE event of the Dialog Box. In the create event you can take that value, place it in the key field and send the 'READ' event to the form.

Let me know how it goes.

-Blaise


At 04 FEB 1998 09:45AM B Cameron wrote:

Blaise,

Thanks for the response. Your suggestion was much "cleaner" than the way I was doing it. My only (2) problems are that now when I use the Dialog_box function the "key" does not get passed and or read.

When I used a single valued attribute (i.e. key=.KEY-]TEXT

then dialog_box it was ok.

The other thing is the CELLPOS will return a value even if the user

has not clicked into the edit table (and there are values there).

I would like to have and "end else" clause to display a msg that the

user must select a value. It works now if the form is blank but not a

record has been read and the table is empty. (i.e. attr or value marks)


At 04 FEB 1998 05:06PM b cameron wrote:

Hey got it. Thanks for the response. I had to

add code to the create event of the window i launched to read…

View this thread on the forum...

  • third_party_content/community/commentary/forums_nonworks/34fffd6d582fd5b88525659f006f3fd0.txt
  • Last modified: 2023/12/28 07:40
  • by 127.0.0.1