cancel
Showing results for 
Search instead for 
Did you mean: 

Replacement for FLD in BPC10NW logic

Former Member
0 Kudos

Hi guys,

So we know we can't use GET in script logic anymore, and to use MDX tuples instead.

But what about the FLD statement? If I need to get the value of a field (member property) as part of my MDX, how do I now do that?

This is a made-up example, but should help to explain:

*REC(EXPRESSION=%VALUE%*([AUDITIDC].[TAX_INPUT],[LEGALENTITY].[COUNTRY],[ACCOUNTC].[VAR_TAX_RATE],[RPTCURRENCY].[LC],[FLOW].[F_CLO],[INTERCO],[NON_INTERCO]),ACCOUNTC="TAX_ISELIM_001")

Everything in the tuple instruction points to a particular member EXCEPT the LEGALENTITY, for which I need to look up this value from the COUNTRY member property. Whatever value is in this property (for the legal entity being run) will give me my LEGALENTITY value for the tuple. This will be dynamic, and I need to ascertain this at runtime.

The end result should be to multiply the %VALUE% by the tax % for the country of the legal entity the user selected.

Hope that makes sense - I've been bashing my head against the wall on this one!

Any suggestions?

Thanks very much,

Jason

Accepted Solutions (1)

Accepted Solutions (1)

former_member186338
Active Contributor
0 Kudos

Hi Jason,

If you want to use property to read some member - use LOOKUP instead of FLD:

*LOOKUP SameModel

*DIM SOMEDIM1=SOMEMEM1

...

*DIM PROP: LEGALENTITY=COUNTRY.LEGENT //LEGENT - property of COUNTRY containing valid LEGALENTITY

*ENDLOOKUP

*REC(EXPRESSION=%VALUE%*LOOKUP(PROP),...

Vadim

Former Member
0 Kudos

Hi Vadim,

Thanks for the quick reply as always.

I tried a variation of this, but it produced an error. Using my example again:

Before:

*REC(EXPRESSION=%VALUE%*([AUDITIDC].[TAX_INPUT],[LEGALENTITY].[COUNTRY],[ACCOUNTC].[VAR_TAX_RATE],[RPTCURRENCY].[LC],[FLOW].[F_CLO],[INTERCO],[NON_INTERCO]),ACCOUNTC="TAX_ISELIM_001")


After - using your lookup example:

*REC(EXPRESSION=%VALUE%*([AUDITIDC].[TAX_INPUT],LOOKUP(PROP),[ACCOUNTC].[VAR_TAX_RATE],[RPTCURRENCY].[LC],[FLOW].[F_CLO],[INTERCO],[NON_INTERCO]),ACCOUNTC="TAX_ISELIM_001")


On validation it produced a syntax error in the region of the lookup - seems MDX doesn't like a lookup being stuffed into the MDX statement. Am I doing something wrong syntactically?

Or is this combination simply not possible?


Thanks again, much appreciated.

Jason

former_member186338
Active Contributor
0 Kudos

O, NO!

Use LOOKUP instead of the whole tuple!

*LOOKUP SameModel

*DIM AUDITIDC="TAX_INPUT"

*DIM ACCOUNTC="VAR_TAX_RATE"

*DIM RPTCURRENCY="LC"

*DIM FLOW="F_CLO"

*DIM INTERCO="NON_INTERCO"

*DIM PROP: LEGALENTITY=COUNTRY.LEGENT //LEGENT - property of COUNTRY containing valid LEGALENTITY

*ENDLOOKUP

...

*REC(EXPRESSION=%VALUE%*LOOKUP(PROP),ACCOUNTC="TAX_ISELIM_001")


Vadim


And please use

to provide required info...

Former Member
0 Kudos

Thanks Vadim! That worked, although it was a little slow - I'll experiment some more, but at least this is working now.

Thanks as always,

Jason

former_member186338
Active Contributor
0 Kudos

No other way for the mentioned requirements.

Vadim

Answers (0)