PDA

View Full Version : A4 system variables


ABC123

rigore
04-24-2005, 02:00 PM
in A4 you could use the system variable to determine what the mode of the user was in as below

if(%SYS_USER_MODE="ENTER","do A","do B")

is there a similar variable in A5 to determine the same thing??

Also in A4 you could read the fields of a record into temp system variables by doing a lookup of that record as below

{XLOOKUPR "equipmnt",VAL(%trec), %status}

once the record was read, i could use the variable %equipmnt_trct_no to populate the data field.

is there a way to do this in A5 now?? or do i have to explicitly read the record and set all the fields to defined variables i need to address before i use them??

thank you for your help in advance.

Allen Klimeck
04-24-2005, 09:14 PM
You need to look for the "TBL".MODE_GET() and LOOKUP() functions also TABLE.EXTERNAL_RECORD_CONTENT_FROM_KEY_GET() and TABLE.EXTERNAL_RECORD_CONTENT_GET()
If you don't have the CHM help file you should get it. Also down load the PDF files and look at the functions & methods.pdf you'll find all of the functions from V4 and a lot more.

Allen

Jim Chapman
04-27-2005, 07:21 PM
Hello Don,

I used the system variables of A4 all the time and when I began with A5 I went looking for their counterpart. I was sorely disappointed when I only found a couple in A5. But as I soon realized A5 has a whole different paradigm. In A5 we mainly use object methods, which are much richer and more plentiful.

As Allen said, *.mode_get() is the way we find out what mode the user is in. You can also use mode_get() with the form with the following syntax:

Parentform.mode_get()


""{XLOOKUPR "equipmnt",VAL(%trec), %status} ""

The lookup functions in A5 are very similar to A4, you won’t have any trouble here.

The transition takes a little work, but it is well worth it. A5 is a very powerful environment and is being extended faster than I can keep up with :-)

Good luck,
Jim