cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Symira
Helper II
Helper II

Deleting image/file from CDS image/file field with flow

Hi,

 

I need to delete file from CDS File field using flows. I tried to delete it by using the "Upload file or image content" action with an empty string as follows:

{

"$content-type": "image/png",
"$content":""

}

 

This does not solve the issue, as the field then displays this "empty file" instead of deleting the file.

 

Any idea?

-S

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
moinkhan4477
Regular Visitor

HI

You will have to use the  CDS's  unbound Action : DeleteFile  image.png

View solution in original post

8 REPLIES 8
moinkhan4477
Regular Visitor

Did you got the solution 

moinkhan4477
Regular Visitor

HI

You will have to use the  CDS's  unbound Action : DeleteFile  image.png

View solution in original post

Thanks @moinkhan4477 , that worked fine!

abm
Super User III
Super User III

Hi @Symira  & @moinkhan4477 

 

Could you please explain where you getting the FileId for deleting the file?



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blogPower Automate Video Tutorials
moinkhan4477
Regular Visitor

@abm 

You will to retrive the main record from CDS containing that field

and set that field value in using expression in the unbound action like below

  outputs('record')?['body/FIELD_SCHEMA-NAME'] 

as shown in screen shot

Hi @moinkhan4477 

 

Thank you so much for your reply. Its so strange that List Rows or Get Rows by Id didn't show the file type schema under the Dynamic properties. As you suggested I added the output/schema name that outputs the Id. Thanks for your help in this.

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blogPower Automate Video Tutorials
marija_iw
Frequent Visitor

Hi @moinkhan4477 

I have retrieved the Id of the image but perform an unbound action still fails with error "fileattachment With Id = 'idvalue' Does Not Exist". I'm passing @{outputs('Get_a_row_by_ID')?['body/env_logoid']} as field because 'body/env_logoid_env_client' returns null.

What am I missing here? Get row by id returns row id and image id. But when unbound action is performed with imageid it fails.

Thanks

 

Hi @marija_iw

Just wondering: Are you sure that field is not already empty? Are you perhaps confusing the fields ['body/env_logoid'] &  'body/env_logoid_env_client' mentioned by you above?

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (1,423)