on 2017 Dec 23 4:59 PM
Hi,
I've created property PARENT to dimension ENTITY and trying to read Interco value of every entity's parent in scriptlogic but it's not working out with below code.I've googled forums for many threads but surprisingly i still can't get a solution hoping someone could guide me in right direction.
*XDIM_MEMBERSET ENTITY = BAS(G_A)
*XDIM_MEMBERSET ACCOUNT = CYNI
*FOR %ENT% = ENTITY
*WHEN INTERCO
*IS "NO_INTERCO"
// Select Value from PARENT property of "ENTITY= %ENT%" to %PARENT% variable
*SELECT (%PARENT%, "[PARENT]", ENTITY, "[ID]='%ENT%'")
// Select Value from INTCO property of "ENTITY=%PARENT%" to %INTCO% variable
*SELECT (%INTCO%, "[INTCO]", ENTITY, "[ID]='%PARENT%'")
*REC(FACTOR=1 , INTERCO = %INTCO%)
//REC(FACTOR=1 , INTERCO = %PARENT%.INTCO) // this also not working
//REC(FACTOR=1 , INTERCO = "I_" + %PARENT%) // this also not working
*ENDWHEN
*NEXT
Here is the error i'm getting
UJK_VALIDATION_EXCEPTION:Member "" not exist
if i replace *REC(FACTOR=1 , INTERCO = %INTCO%) with *REC(FACTOR=1 , INTERCO = I_B) I'm getting records generated. So, looks like SELECT is not storing variables. How could i do this? I made sure that ENTITY has values for PARENT and INTCO properties as shown below.

Request clarification before answering.
You need to understand some very basic things about script logic:
1. SELECT can't be used inside WHEN/ENDWHEN (and inside FOR/NEXT), it's executed only once at the beginning of script execution.
2. Instead of property PARENT create property PARENTINTCO and fill it with I_B for this sample.
Then:
*WHEN INTERCO
*IS "NO_INTERCO"
*REC(FACTOR=1 , INTERCO = ENTITY.PARENTINTCO)
*ENDWHEN
And remove FOR/NEXT loop for ENTITY - useless
No other way.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 10 | |
| 9 | |
| 6 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.