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

Setting string attribute in CDS to an empty string

How to set a string datatype attribute in CDS with an empty string value using Flows? I do not want to set null but instead an empty string literal. 


Power Maverick | Microsoft Business Application MVP
2 ACCEPTED SOLUTIONS

Accepted Solutions

Hi @PowerMaverick 

I just made some tests by settings the Null expression to a text type of field.
But in Power Automate, when testing the record against Null or Empty, it returns True to both.

What makes you think CDS can distinguish them?

View solution in original post

My bad. I did a wrong testing which made be think it does distinguish between empty and null.

 

@LinnZawWin confirmed this via tweets 🙂. Check out the conversation thread on Twitter.


Power Maverick | Microsoft Business Application MVP

View solution in original post

5 REPLIES 5
Mira_Ghaly
Dual Super User
Dual Super User

@PowerMaverick 

You have to set it to Null expression so it gets cleared.

 

 

If this post helps you with your problem, please mark your as Accepted solution.If you like my response, please give it a Thumbs Up.

Blog: here

But I want to set it to an empty string. CDS distinguishes between null & empty string and I have a requirement where if it is null then do X and if it is empty then do Y. If I can't set empty then I cannot do Y.


Power Maverick | Microsoft Business Application MVP

Hi @PowerMaverick 

I just made some tests by settings the Null expression to a text type of field.
But in Power Automate, when testing the record against Null or Empty, it returns True to both.

What makes you think CDS can distinguish them?

Hi @PowerMaverick 

 

Could you please refer the relevant documentation regarding CDS distinguishes between null & empty string?

 

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

My bad. I did a wrong testing which made be think it does distinguish between empty and null.

 

@LinnZawWin confirmed this via tweets 🙂. Check out the conversation thread on Twitter.


Power Maverick | Microsoft Business Application MVP

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (4,409)