03-27-2023 12:27 PM - last edited on 05-23-2023 04:27 AM by JackLacava
Hello All,
Need assistance in getting the USD Override amounts to populate Local Currency Parents in USD values. The USD Parents are working correctly when data is retrieved in Local or USD.
Example
Local Curr Entity CNY (rate .800) - 2000, USD Override - 3000
USD Parent Entity (USD) - 3000
Local Currency Parent (CNY) - CNY - 2000, USD - 1600
03-29-2023 05:44 AM
I guess it will depend on the rule you're using to generate that override...? You might have to provide a bit more information. Generally speaking, you have to remember that (by default) Calculate runs on Local Currency of Parent member too, as last step of Consolidation, so you might have code that is running when it shouldn't (i.e. in your formula you might have to check if the member is a parent or child before you execute api.Data.Calculate or other things).
03-30-2023 08:19 AM - edited 03-30-2023 08:20 AM
We are leveraging the text1 field = USD for accounts and added in the flow dimension If (api.Entity.HasChildren()) And LocalCurrency.Name.ToString <> "USD" Then Api.Data.Calculate(....). Even using this it pulls local currency to the parent and then translates it to USD.
03-30-2023 11:08 AM
Ah, I guess you're using a specific Flow Processing Type then...? It's a bit above my pay grade, but for the benefit of anyone who might really know how it works, you might want to paste the "Flow Processing" section of your Flow member to complete the picture.
As general tips, always make sure your "if" blocks actually get executed, liberally dropping something like api.LogMessage("running") inside them and then checking the log; and maybe use api.Cons.IsLocalCurrencyForEntity or isForeignCurrencyForEntity, rather than comparing strings (which should be done with .xfEqualsIgnoreCase anyway).