cancel
Showing results for 
Search instead for 
Did you mean: 

BPC 10 MS - FILTER USING PROPERTY

Former Member
0 Kudos

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.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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

Answers (2)

Answers (2)

former_member186498
Active Contributor
0 Kudos

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

Shrikant_Jadhav
Active Contributor
0 Kudos

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