cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ezequiel
Microsoft
Microsoft

Combine conditions on filter array

Hi

 

I'm trying to combine two AND on the following:

 

@And(equals(item()?['_me_areaoptionset_label'], 'United States'),greater(item()?['msevtmgt_eventstartdate'],utcnow())

 

but I'm getting the following error:

 

There is an unterminated string literal at position 28 in 'msevtmgt_eventstartdate gt ''.

 

Can you help me to understand what is going wrong?

 

Thanks

 

Ezequiel 

4 REPLIES 4
Expiscornovus
Super User
Super User

Hi @ezequiel,


It looks like you are missing a closing ). And I would also say you probably needs some formatting in your utcNow funciton as well.

 

Can you try this instead:

@and(equals(item()?['_me_areaoptionset_label'], 'United States'),greater(item()?['msevtmgt_eventstartdate'], utcNow('yyyy-MM-dd')))

 

Note: you might need to change the formatting to the formatting you are using in that eventstartdate though.



Happy to help out! 🙂

Interested in more #PowerAutomate #SharePointOnline or #PowerVirtualAgents content?
Visit my blog, Subscribe to my YouTube channel or Follow me on Twitter


Thanks for the reply. I tested it with your suggestion, but I'm still getting the error

"There is an unterminated string literal at position 28 in 'msevtmgt_eventstartdate gt ''."

 

the format of the eventstartdate is correct as yyyy-MM-dd

 

Any suggestion?

 

Thanks

 

Ezequiel

Expiscornovus
Super User
Super User

Hi @ezequiel,


Can you share a couple of screenshots of your flow setup? 



Happy to help out! 🙂

Interested in more #PowerAutomate #SharePointOnline or #PowerVirtualAgents content?
Visit my blog, Subscribe to my YouTube channel or Follow me on Twitter


v-bofeng-msft
Community Support
Community Support

Hi @ezequiel :

Maybe you could try:

@And(
  equals(item()?['_me_areaoptionset_label'], 'United States'),
  greater(formatDateTime(item()?['msevtmgt_eventstartdate']),utcnow())
)

If this formula not work,could you please tell me:

  • What is msevtmgt_eventstartdate's  data type?
  • Could you provide a demo of the data source?

Best Regards,

Bof

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Users online (1,656)