cancel
Showing results for 
Search instead for 
Did you mean: 

How To Populate a Variable with Base-level Members in BPC 7.5 NW Script Logic

TedemanCPA
Participant
0 Kudos

Hi All,

One issue we've never been able to solve with BPC script is how to get a list of all Base-level members of some parents to populate a BPC script variable (e.g. like:  %VARIABLE%).

Usually, these script variables simply contained a comma-list of the members that might be selected with

 

*SELECT(%VARIABLE_LIST1%,"[ID]",ACCOUNT,"[ACCTYPE]='EXP' ")

Anyone have any creative ideas of how to cycle through, say, BAS(SOME_PARENT), and pick up the ID's of all the base/leaf accounts.  ...Unfortunately, it turns out that SELECT can't use a "BAS" selection, or even PARENTH1 in it's selection criteria.

Any ideas?

Accepted Solutions (1)

Accepted Solutions (1)

former_member200327
Active Contributor
0 Kudos

Hi Garrett,

Try *XDIM_MEMBERSET <Dim name> as %var_name% = BAS(SOME_PARENT).

Regards,

Gersh

former_member186338
Active Contributor
0 Kudos

One additional comment to the statement with "as":

*XDIM_MEMBERSET <Dim name> as %var_name% = BAS(SOME_PARENT)

This statement only assigns the value to the %var_name%, without changing the scope of <Dim name>!

Answers (1)

Answers (1)

TedemanCPA
Participant
0 Kudos

Gersh,

That was exactly what I was looking to do!  To be able to use an XDIM to fill a variable with all the base-level members of one of these things.  ....shoot, we've been trying to figure out an appropriate way to get this for a long time now, but never saw that syntax for "AS"  (even though I think it might have been in the MS version).

Vadim,

You're right too, we've done some tests to make sure tha variable works, but it's also clear that if you use the XDIM / AS line there, you essentially have to use a 2nd similar line to otherwise define the scope.  We don't might that at all though.

One key note here:  The main reason we were looking to do this is that if you have to select a "batch" of accounts to process based on some Parent.  Let's say, all Travel Expenses or something, that parent won't change much, so being able to process bas on a hierarchy selection will be much less maintenance, more dynamic, and a much better solution overall.

Thanks experts!