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

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

10 REPLIES 10
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

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 blog
Power 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 blog
Power 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?

I'm having the same problem. Any updates?

This process does not work. The file is never found.

Helpful resources

Users online (3,477)