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 29 JUL 1999 05:49:38PM ** Mike Daniel ** wrote:

I have just received my OI 3.7 and have a ?

when you have a Form and a popup button on the form to to a

customer file popup #|name (type thing) and you have it returning

the correct value in the popup test.

How do you get the value that is returning to autoload the form

with the data that matches the key once the popup val has been

chosen?

Mike Daniel [email protected]


At 29 JUL 1999 08:33PM Don Bakke wrote:

Mike,

1) If all you want to do is load the returned value to the ID control, you can do all this in a QuickEvent and specify the control name and TEXT property in the "Return Value In" section. However, this can make reading the record difficult because the focus is already off of your ID control. If you click back into the ID control, the system doesn't know that it's value was changed (because the GOTFOCUS_VALUE property and the TEXT property match at this point.) So it is better to go with option #2…

2) If you want the form to auto-load the record then you have to put your PopUp in the procedural code of your button's CLICK event. After you Set_Property the TEXT property of your ID control you need to use the Send_Event function and send the READ event to @Window.

[email protected]

SRP Computer Solutions


At 30 JUL 1999 02:40AM [email protected] onmouseover=window.status=why not click here to send me email?;return(true)", [url=http://www.sprezzatura.com" onMouseOver=window.status=Why not click here to visit our web site?';return(true)]Sprezzatura Group[/url] wrote:

If you wish to shortcut number 2 you can just return the value to the QBFLIST property of @WINDOW, this forces a read without any procedural code.

[email protected]

Sprezzatura Group

World Leaders in all things RevSoft


At 30 JUL 1999 02:56AM Don Bakke wrote:

Ah, yes, but your READ event won't fire. Plus, you are in QBF mode so things like having your form clear after write won't work either.

[email protected]

SRP Computer Solutions


At 30 JUL 1999 03:17AM [email protected] onmouseover=window.status=why not click here to send me email?;return(true)", [url=http://www.sprezzatura.com" onMouseOver=window.status=Why not click here to visit our web site?';return(true)]Sprezzatura Group[/url] wrote:

Are you up late or early?

Your own personal read event may not, you're right. Must admit to never having worried about the QBF mode thing…

[email protected]

Sprezzatura Group

World Leaders in all things RevSoft


At 30 JUL 1999 09:39AM Don Bakke wrote:

Are you up late or early?

Late. It was around midnight when I posted that message.

[email protected]

SRP Computer Solutions


At 30 JUL 1999 10:12AM ** Mike Daniel ** wrote:

Andrew,

How do you go about doing the item that you stated in your 1st

reply?

Mike


At 30 JUL 1999 10:16AM ** Mike Daniel ** wrote:

Okay,

So Don, What is the way I should perform this operation?

Thanks

MD

[email protected]

http://pcs.bayou.com


At 30 JUL 1999 11:28AM Don Miller - C3 Inc. wrote:

Mike .. this is from a different Don.

OK, your code should look something like:

* this is on a dropdown or options or something like that for the

* key prompt of a form

Declare Function Repository, Send_Event

Declare Subroutine Set_Property

* you can do any repository call you want.

Key=Repository("EXECUTE","")

If Len(Key) then

  • note, if you want a browse list then
  • set the property of @WINDOW,"QBFLIST" to contain the keys
  • and bypass the read
  SET_PROPERTY(Ctrlentid,"DEFPROP",KEY)
  bRETURN=SEND_EVENT(@WINDOW,"READ")
  • do any error checking you need

END

RETURN 1 ;* this will allow other events in the chain to execute

Hope it helps..

Don Miller


At 30 JUL 1999 01:45PM Don Bakke wrote:

Okay, Don #1 here (based on order of response to this thread…)

I just wanted to point out that Don Miller's code assumes that you are calling the OPTIONS event for your ID control. I believe you wanted to click on a button next to the control so his code won't work without a little modification, mainly, changing the variable CtrlEntId to something like @Window:".EDITLINE_NAME".

Also, everytime I've used DEFPROP instead of TEXT in this type of operation I get the SAVEWARN message when I execute the READ using Send_Event. The reason is that using DEFPROP updates the underlying databound column which causes the form to think you might be losing changes to the current form.

FWIW,

[email protected]

SRP Computer Solutions


At 30 JUL 1999 02:52PM ** Mike Daniel ** wrote:

So how does it go?

Rugh draft of screen: pbp=Push Button Prompt fld=Field

pbp:  key fld
Name:  reg fld

Want to push button and get popup, make choice and return key to win

have win load info.

Thanks guys for helping.. Just in case no one else has told ya.


At 30 JUL 1999 02:59PM ** Mike Daniel ** wrote:

BTW this is how I have it configed

the pbp (PushButtonPrompt) q-e has in the

control= SITES.SITENUM prop= "TEXT"

and in the script I have:

Declare Function Repository, Send_Event

Declare Subroutine Set_Property

Key=Repository("EXECUTE","ANITABLE*POPUPSITES") If Len(Key) then SET_PROPERTY(CtrlEntId,"DEFPROP",KEY) bRETURN=SEND_EVENT(@WINDOW,"READ") END RETURN 1 This currenty places the value into the pbp's text label and gives error stating "All key vaules are empty" </QUOTE> —- === At 30 JUL 1999 03:36PM Don Miller - C3 Inc. wrote: === <QUOTE>Don #2 .. you're absolutely right. In fact, I usually hook this thing to a dropdown. The DEFPROP is a habit I've fallen into because it ensures that the database bound controls get updated properly and the RECORD property is reasonably consistent. Don Miller </QUOTE> —- === At 31 JUL 1999 06:36PM Barry Stevens wrote: === <QUOTE>Assume Key Control is SITES.SITENUM Declare Function Repository, Send_Event Declare Subroutine Set_Property Key=Repository("EXECUTE","ANITABLE*POPUPSITES")

If Len(Key) then

SET_PROPERTY(@Window:".SITENUM","TEXT",KEY)

bRETURN=SEND_EVENT(@WINDOW,"READ")

END

RETURN 1

View this thread on the forum...

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