cancel
Showing results for 
Search instead for 
Did you mean: 

How to read characteristics value within foreach loop in FOX

Former Member
0 Kudos

Hello!

In FOX we can use the OBJV( ) to read the value of characteristics, but not within a FOREACH loop.

<b> Does somebody know one way to read a characteristcs within a FOREACH loop without putting the characteristc in the "field to be changed"?</b>

Thanks in advance!!!

Aline.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

I found another way to solve my problem.

Thank all

Former Member
0 Kudos

Hi,

OBJV can only be used for fields which are not to be changed. If you want to have the value of a characteristic to be changed why don't you just create a variable:

FOREACH variable.

value = variable

<statement>

ENDFOR

value needs to have the same type declared as variable.

What is it you would like to achieve? give us details and we will help

D

Former Member
0 Kudos

The problem is: I have a multi planning area where I merge data to create new records. The point is I have to many characteristics to copy for this new register. For example:

register 1 = field1, field2, field3,......field59, field60.

register 2 = fieldA, fieldB, fieldC.

result register3 = fieldA,fieldB,fieldC,field1,field2,field3,.......field59,field60.

I can't put 60 characteristics in "filed to change"!

Thanks !

Aline.

Former Member
0 Kudos

What is it you would like to do?

Can't you create an aggregation level with only the common characteristics and perform your function?

D

Former Member
0 Kudos

Hi Aline,

Its not clear how your operands register1, register2, and register3 have different number of characteristics. For any FOX function, all the operands (representing data records) should have same number of characteristics.

Please elaborate a little more about your scenario.

Former Member
0 Kudos

If you are in BPS, try VARV statement if you have a BPS variable on this char at the planing area.

Ravi Thothadri