Skip to main content
October 5, 2023
Solved

Book if statement

  • October 5, 2023
  • 3 replies
  • 0 views

Hi,

My company has entities 2,5,8,N,U,O,X,Z.

When I prepare the loop and if statement in the books;

not sure why I could only use the if statement for N/U/O/X/Z but not 2/5/8.

I have tried different settings but still not working.
Can you share with me how should I write the code if the entity name is purely a number?
Thank you.

(|Loop1Variable| =[2]) Or (|Loop1Variable| =[U])Or (|Loop1Variable| =[O])Or (|Loop1Variable| =[X])Or (|Loop1Variable| =[5])Or (|Loop1Variable| =[8])
(|Loop1Variable| =2) Or (|Loop1Variable| =[U])Or (|Loop1Variable| =[O])Or (|Loop1Variable| =[X])Or (|Loop1Variable| =5)Or (|Loop1Variable| =8)

 

 

a.PNG

Best answer by michaelkeung

Finally I fixed it  by not reading the entity name but its member property of its currency:

(XFMemberProperty(DimType=Entity, Member=|Loop1Variable| , Property=Currency) = [USD])

3 replies

October 6, 2023

Not tested, but I would try placing double-quotes around the number.

October 26, 2023

I am afraid it doesnt work....

October 16, 2023

I think you need to wrap the parameters in square brackets. Image is of a working if statement in our app. Good luck!Thomas_Bennett_0-1697448865927.png

 

michaelkeungAuthorAnswer
January 5, 2024

Finally I fixed it  by not reading the entity name but its member property of its currency:

(XFMemberProperty(DimType=Entity, Member=|Loop1Variable| , Property=Currency) = [USD])