Skip to Content
0
Former Member
Dec 05, 2008 at 08:08 AM

Pick the right account Problem

20 Views

Hi,

I have a question. Does anybody know a good way to check different accounts for figures and as soon as I find figures I want to stop the search. I have pasted a simplified version of my code beneath, but I am having problems because it is slow and I cannot make it run for all entities at once. Does anybody have a different solution?

Best regards

Robert

*test_when(Get(Account="AccountPrio1")=0)

*when Account

*is AccountPrio2

*rec(Account=AccountPrio1)

*endwhen

*go

*test_when(Get(Account="AccountPrio1")=0)

*when Account

*is AccountPrio3

*rec(Account=AccountPrio1)

*endwhen

*go

*test_when(Get(Account="AccountPrio1")=0)

*when Account

*is AccountPrio4

*rec(Account=AccountPrio1)

*endwhen

*go

*when account

*is AccountToBeTranslated

rec(Expression = (Get(Account="AccountPrio1" %value%), Rptcurrency = GroupCurrency)

*endwhen

-


AccountPrio1 = NULL (nothing)

AccountPrio2 = 10

AccountPrio3 = 11

AccountPrio4 = 12

AccountToBeTranslated = 5

Result 55 (5*10)