cancel
Showing results for 
Search instead for 
Did you mean: 

Script logic question

Former Member
0 Kudos

Hello,

Here is the scenario, I have a dimension(lets call it ASSIGNMENT) with 4 properties - lets just call them property A,B,C, and D. Property A,B, and C are basically dimension IDs from other dimensions. Lets call them Dimensions X, Y, and Z. So why have dimension X,Y, and Z's dimension IDs as properties and another dimension? because some combinations(Decided by business) of X,Y, and Z's IDs result in all the future data loads to reassign the value of dimension Z. These rules of which combinations will result in reassignment from data loads are stored in the dimension ASSIGNMENT. Now my issue is how to write a script logic(that will be included in default script logic) that basically goes through each record thats coming in, then looks at each rule(row) of dimension ASSIGNMENT and if any data records the property A, B, and C combination - then reassign dimension Z ID to property D value for that rule(Row). Please tell me if this is possible. thanks.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Zack,

As I understand this seems to be rather straighforward. Just to validate my point, you send number of record with all 4 dimensions defined but you want to redefine the intersections for dimensions X,Y and Z.

It could look like this:


// Test if all properties are filled in
*WHEN ASSIGNMENT.A
*IS NOT ""
*WHEN ASSIGNMENT.B
*IS NOT ""
*WHEN ASSIGNMENT.C
*IS NOT ""
*REC(FACTOR=0) // clear out original assignment
*REC(FACTOR=1,X=ASSIGNMENT.A,Y=ASSIGNMENT.B,Z=ASSIGNMENT.C)
*ENDWHEN
*ENDWHEN
*ENDWHEN
*COMMIT

Please note that the code section strips out equation charactes. Therefore *IS NOT is used. Replace as appropriate.

Hope this helps,

Madis

Answers (0)