cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
asturnebur
Advocate I
Advocate I

Check attachments in sharepoint list

When a new item is created or when item is already created and get attachments given an Id,  I cant check if an item has attachments

 

I tried when new item is created using this expresion: @equals(triggerBody()?['Attachments'], true) 

 

In other hand, when item is already created and following get attachments body, given an id, cant create a condition if object is empty with @not(equals(empty(body('Obtener_datos_adjuntos')), true))

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
v-micsh-msft
Community Support
Community Support

Hi @asturnebur,

 

The When a new item is created trigger didn't contain any information about the Attachments, so it can't be used to check whether attachment is empty.

Further, to check if the Attachments is empty, we could just use:

@empty(body('Obtener_datos_adjuntos'))

If the result is yes (true), means there is no attachment.

 

Regards,

Michael

 

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-micsh-msft
Community Support
Community Support

Hi @asturnebur,

 

The When a new item is created trigger didn't contain any information about the Attachments, so it can't be used to check whether attachment is empty.

Further, to check if the Attachments is empty, we could just use:

@empty(body('Obtener_datos_adjuntos'))

If the result is yes (true), means there is no attachment.

 

Regards,

Michael

 

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (2,325)