on 04-23-2015 8:50 PM
HELLO,
CAN WE USE "PARENTH1" IN SCRIPTLOGIC TO FILTER RECORDS? WILL BELOW LOGIC WORK?
*WHEN ACCOUNT
*IS ACCT1
*WHEN DATASRC.PARENTH1
*IS "PROP1"
*REC(FACTOR=1,ACCOUNT=ACCT2)
*ENDWHEN
*ENDWHEN
THANKS IN ADVANCE.
Hi Meghana,
Yes this will work without any doubts. Good luck with your scripting, You don't need to do any select statements...use it as you wrote it (if that is the correct member id's and properties)
*WHEN ACCOUNT
*IS ACCT1
*WHEN DATASRC.PARENTH1
*IS "PROP1"
*REC(FACTOR=1,ACCOUNT=ACCT2)
*ENDWHEN
*ENDWHEN
But remember that with all properties it only check the id's that actually have that property and not sub-levels of that. If there are many levels below DATASRC.PARENTH1="PROP1" then I would do a:
*XDIM_MEMBERSET DATASRC = Descendants([DATASRC].[PROP1],999,leaves)
*WHEN ACCOUNT
*IS ACCT1
*REC(FACTOR=1,ACCOUNT=ACCT2)
*ENDWHEN
(in reality you could skip the "FACTOR=1" part as well)
tested and confirmed on BPC MS 10.0
Brgds
Mattias
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Meghana,
I don't think is changed in 10 version, until 7.5 the answer is no, in MS script logic you have to write a *SELECT to extract the children and use this in the *WHEN,
e.g. supposing PROP1 is your parent in datasrc
*SELECT(%DSRC%,"ID","DATASRC","PARENTH1 = 'PROP1'")
...
*WHEN ACCOUNT
*IS ACCT1
*WHEN DATASRC
*IS %DSRC%
*REC(FACTOR=1,ACCOUNT=ACCT2)
*ENDWHEN
*ENDWHEN
Regards
Roberto
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Meghana,
Since it works with property in "when" statement, PARENTH1 should work, (not tested). But make sure that you are not any data on parent node.
Shrikant
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
14 | |
4 | |
2 | |
1 | |
1 | |
1 | |
1 | |
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.