cancel
Showing results for 
Search instead for 
Did you mean: 

FOREACH (Fox formula) ...a rule

Former Member
0 Kudos

Hi,

It may be basic to some but I have been experiencing some unknown behavior when using fox formulas with ForEach.

I thought that this statement was jumping over (not reading) records for which no Key figure in the level contained a value. This is not completely true.

I have been lately creating functions when the statement was able to run and modify records even if for the exact combination of characteristic values I did not have a single (I promise) key figure with value.

However, in many cases, specially with values "#" and time characteristics I have to use dummy key figures or silly standard COPY functions.

The truth is that after 6 hours trying to establish a new rule, I am not able to deduce or explain when the ForEach will read or "jump" over a certain combination of characteristic values.

Any light very much appreciated.

Alberto

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Alberto,

I have not completely understood your issue but I am posting some general information about FOX Functions and how to test them:

1. Limit your selection to a few records

2. FOREACH statement groups data by the characteristics that are not in the fields to be changed.

3. Execute your function in trace so that you could view the data read and records changed.

4. Trace gives a before and after image of records changed and you could validate it.

4. Records which have changed should have characteristic values which are defined in the planning package selection because BPS only allows change for your selections defined in package.

Hope this helps.

Akash

Former Member
0 Kudos

Yes, yes...

The basics are clear but actually when using a foreach, a DO or any statement using a variable BPS does not read records even if they are contain in the package.

I believ that it's because for the combination of characteristics values we don't have any key figure with a value...but I am not sure.