Forum Discussion

tcook's avatar
tcook
New Contributor
3 months ago
Solved

Utilizing a Where Clause for filtering on a Text Field in an api.Data.Calculate business rule

I am unsuccessfully trying to write an expression to utilize a Text Field as a filter in a business rule:

api.Data.Calculate("U4#Target = U4#Source*-1","A#IncomeStatement.Base",,,,,,"U3#UserDefined.Base.Where(Text1 = 'Filter')")

 Is this syntax possible, or is there another way that I can write this to ensure that it is only being written when Text Field 1 for UD3 is equal to "Filter?"

Additionally, is it possible to attach this to a transformation rule as a complex expression as opposed to needing to run it through Data Management after loading data?

  • api.Data.Calculate("U4#Target = RemoveZeros(U4#Source*-1)","A#IncomeStatement.Base,,,,,,U3#UserDefined.Base.Where(Text1 = YourTextValue)")

    Can you try this?

     

  • pranav46's avatar
    pranav46
    Contributor II
    api.Data.Calculate("U4#Target = RemoveZeros(U4#Source*-1)","A#IncomeStatement.Base,,,,,,U3#UserDefined.Base.Where(Text1 = YourTextValue)")

    Can you try this?