Salesforce

Where Do Variables Fit In (Magic xpa 4.x)

« Go Back

Information

 
Created BySalesforce Service User
Approval Process StatusPublished
Objective
Description

Where Do Variables Fit In (Magic xpa 4.x)

We often need to access variables from an ancestral program in a called program or task. This is done in a way that is similar to the runtime task tree. The first variable in the main program is 1 or A, and the subsequent variables are numbered sequentially until the current program. Therefore, in the case of a regular Magic xpa application, as shown in the first figure in this section, the variable tree would be:

A

1

A

B

2

B

A.A

3

C

A.B

4

D

B.A

5

E

B.B

6

F

But what happens when the component is called, as shown in the second figure in this section. In this case, the component’s main program variables are added to the tree before the last program. The variable tree would then be:

A

1

A

B

2

B

A.A

3

C

A.B

4

D

C

5

E

D

6

F

C.C

7

G

C.D

8

H

As we have seen, unlike the generations, the component’s main program variables are taken into account. The Magic xpa functions that deal with variable generations are:

VarAattr, VarCurr, VarCurrn, VarDbName, VarIndex, VarInp, VarMod, VarName, VarPic, VarPrev, VarSet.

Reference
Attachment 
Attachment