Happy Holidays.
I'm attempting a Get items filter query such as:
- A Field eq '{whatever was selected in automatic trigger input}' and (if another input field eq 'Yes', make a field Tune0/Textlisttxt eq 'Yes' otherwise/else, make (Tune0/Textlisttxt 'Yes' or make Tune0/Textlisttxt 'No')) i.e.: it s
- The following works fine since there is no 'if' statement:
- (Band eq '@{triggerBody()['text']}') and (Tune0/SetListtxt eq 'Yes' or Tune0/SetListtxt eq 'No')
- BUT!!! That second part is not taking into consideration the second input trigger requirements yet. (See attachment of flow)
- The second input parameter is triggerBody(['text_11']). Then, I've set a variable to return:
- 'Yes' if Set list only is choosen,
- 'No' if All music is chosen
- Here's the variable:
- if(equals(triggerBody()['text_1'],'Setlist only'),'Yes','No')
- So, in the Filter Query, I've tried to implement the if statement to handle the logic but iot keeps failing and after many different configurations, can't find what is wqrong with my syntax. Here is what I've tried that makes most sense (to me 🙂)
- (Band eq '@{triggerBody()['text']}') and (Tune0/SetListtxt eq '@{if(equals(variables('Music'),'Yes'),'Yes',Tune0/SetListtxt eq 'Yes' or Tune0/SetListtxt eq 'No')}')
Any assistance would be greatly appreciated.
NOTE: I tried at add the code as javascript but posting kept returning an error about bad HTML (?????). I think I've had enough errors for one day.
Thanks