Skip to Content
1
Former Member
Oct 23, 2013 at 09:35 AM

Check for value in script logic

765 Views

Hi,

I need to write a script that looks at the value on a specific account and, if the amount is negative, performs to *REC statements. In BPC MS I would use the GET keyword, but that does not work in BPC NW. What alternative can I use?

I tried this:

*SELECT(%NETACCOUNT%,[ID],"ACCOUNT","[NETACCT]<>''")

*XDIM_MEMBERSET DATASRC=INPUT
*XDIM_MEMBERSET TIME=%TIME_SET%
*XDIM_MEMBERSET ENTITY=%ENTITY_SET%
*XDIM_MEMBERSET CATEGORY=%CATEGORY_SET%
*XDIM_MEMBERSET CURRENCY=LC
*XDIM_MEMBERSET ACCOUNT=%NETACCOUNT%
*XDIM_MEMBERSET ACCTDETAIL=F_CLO
*XDIM_MEMBERSET CONSOSCOPE=G_NONE

*FOR %ACC%=%NETACCOUNT%
*WHEN [ACCTDETAIL].[F_CLO]
*IS < 0
*REC(FACTOR=-1,DATASRC=INPUT2)
*REC(FACTOR=1,ACCOUNT=ACCOUNT.NETAACT,DATASRC=INPUT2)
*ENDWHEN
*NEXT

but the validation fails saying that [ACCTDETAIL] is an invalid dimension (which it is not, the *XDIM_MEMBERSET at the top on the same dimension validates just fine.

I also tried to use *SELECTCASE but that fails the validation as well.

Can anyone help me with this one??

Thanks,

Arnold