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

IsEmpty with a LookUp on a CDS Data Source always returns false

If I use IsEmpty to test whehter lookup is returning any record, it always returns false. But with the same data source if I use IsBlank then it work as expected...

If(

IsEmpty(LookUp([@'CDS DS'], some filters)),

//do somthing, it will never get here...

)

 

If(

IsBlank(LookUp([@'CDS DS'], some filters)),

//do somthing, it will work as expected

)

 

I thought IsEmpty is the one to be used with a table and IsBlank with  a string...

what have I missed here? Why IsEmpty is always returning false...?

1 ACCEPTED SOLUTION

Accepted Solutions
xyd
Helper II
Helper II

Hey @VijayTailor 

 

Had another closer look at the reference on IsBlank, IsEmtpy and found

" the IsBlank and Coalesce functions test for both blank values or empty strings." ...

"In the context of the IsEmpty function, empty is specific to tables that contain no records."

 

So it all making sense now.

coz I am using LookUp and that will return a record I guess that doesn't really qualify as a table.

 

Thanks anyways.

Xun

 

 

View solution in original post

2 REPLIES 2
VijayTailor
Resident Rockstar
Resident Rockstar

Hi @xyd ,

IsEmpty only with String like no character, 

For More Information please see the below url.
https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-isblank-isempty

 

Hope this will help you to understand more about IsBlank or IsEmpty Function behavior.

Thanks,
Vijay

Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."-Vijay



xyd
Helper II
Helper II

Hey @VijayTailor 

 

Had another closer look at the reference on IsBlank, IsEmtpy and found

" the IsBlank and Coalesce functions test for both blank values or empty strings." ...

"In the context of the IsEmpty function, empty is specific to tables that contain no records."

 

So it all making sense now.

coz I am using LookUp and that will return a record I guess that doesn't really qualify as a table.

 

Thanks anyways.

Xun

 

 

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Changes to Ideas Coming

We are excited to announce a new way to share your ideas for Power Apps!

Top Solution Authors
Top Kudoed Authors
Users online (1,753)