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!

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
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Users online (1,968)