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 18 MAY 2002 07:08:28AM Rudhy B wrote:

I am running both Arev and OI32 to access the same data.

There is a field that contains the value "Y" or "N" in Arev. However, in OI forms, I would like to convert this field to a check box and write back the result to "Y" or "N"

In the READ event, i wrote:

if {PREMI} EQ "Y" THEN

set_property(win_name : ".PREMI","CHECK",1)

END ELSE

set_property(win_name : ".PREMI",0)

END

The above works well. But during the WRITE event, I want to change the value back to "Y" or "N" (i don't want to save it as 1 or 0)

So i have the following script at WRITE event:

CHECK_STATUS=GET_PROPERTY(WIN_NAME : ".PREMI","CHECK")

OPEN "DICT.EMPLOYEE_DB" TO @DICT ELSE NULL

IF CHECK_STATUS=1 THEN

   {PREMI}=Y"

END ELSE

   {PREMI}=N"

END

FORWARD_EVENT()

RETURN 0

But it always write back as 1 or 0. I tried changing the @record but it still writes back as 1 or 0 (instead of Y or N).

What should I do ?

Rudhy


At 18 MAY 2002 10:05AM [url=http://www.sprezzatura.com" onMouseOver=window.status= Click here to visit our web site?';return(true)]The Sprezzatura Group[/url] wrote:

{} is pure RHS and cannot be used LHS, so={} is allowed but {}=is not.

The simplest solution we can see is to add a hidden field containing the data (Y or N) and a non data linked check box. At the pre-save if the check box is true set the data aware control to Y, if false N.

The Sprezzatura Group

[i]Celebrate CeBIT with Sprezz Local![/i]


At 18 MAY 2002 04:51PM Richard Hunt wrote:

You could also create your own "yes/no" ICONV/OCONV conversion proceedure. That way it would automatically do it for you at read and write time.

Check out the "ZIP_FORMAT" row (record), in the "SYSPROCS" table (file).

I use this method for comboboxes, checkboxes, and radio buttons. Works great.


At 19 MAY 2002 09:18AM Rudhy B wrote:

Yeap, that works :)

BTW, I love your CPUPlus and SList 32.

Rudhy


At 19 MAY 2002 12:05PM [url=http://www.sprezzatura.com" onMouseOver=window.status= Click here to visit our web site?';return(true)]The Sprezzatura Group[/url] wrote:

Very glad to hear it (and thanks ). Richard's answer is actually better but figured ease of use would triumph over programming effort…

Sorry we missed you on way to Oz - can we catch you on way back? - Francesca has Singapore on her "must visit list".

The Sprezzatura Group

[i]Celebrate CeBIT with Sprezz Local![/i]


At 21 MAY 2002 06:26AM Rudhy B wrote:

I'll figure out Richard's way. But since I'm a OI novice i'll use ur solution for now:)

Francesca should stop over in Singapore (the cleanest city on earth :)

I'm in HongKong on the way to Manila. I'll be at the Las Vegas conference. I'll stop by introduce myself. I'm looking for tools to make it easier for us to convert our Arev app to OI.

Rudhy


At 21 MAY 2002 11:33AM [url=http://www.sprezzatura.com" onMouseOver=window.status= Click here to visit our web site?';return(true)]The Sprezzatura Group[/url] wrote:

We do have tools to assist the process, as do other developers who hang around here! Look forward to seeing you at Vegas.

The Sprezzatura Group

[i]Celebrate CeBIT with Sprezz Local![/i]

View this thread on the forum...

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