cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
hadimarashy
Frequent Visitor

How to find if an image is blank

Hi all,

I am hoping you can help me out.

I have a form connected to the SQL database, and I want to check if an image is null by using If(IsBlank(Image38.Image),false,true).

However, after checking Image38.Image value is showing appres://datasources/inspection_plant_daily/table/%5Bdbo%5D.%5Binspection_plant_daily%5D/rows/97/inline/accumulated_debris_image even though its null in the database.

I also tried If(IsBlank(daily_inspection_gallary.Selected.all_oil_levels_image),false,true) and I get same result.

What is the best way to find if the image is null?

Thanks in advance for any suggestions.

1 ACCEPTED SOLUTION

Accepted Solutions
v-xiaochen-msft
Community Support
Community Support

Hi @hadimarashy ,

 

I reproduced your problem.

This happens because "appres://" is just a reference. Regardless of whether the image/varbinary column in the database has a value, the reference will exist. So you can't use blank()/Isblank() to check if the image is blank.

 

You could use JSON function to solve it.

I did a test for you .

vxiaochenmsft_0-1637639469262.png

vxiaochenmsft_1-1637639539884.png

 

vxiaochenmsft_2-1637639565818.png

 

You could add a button to create a collection or variable.

ClearCollect(Col,ForAll(Gallery1.AllItems,JSON(ThisRecord.Image2.Image,JSONFormat.IncludeBinaryData)))

 

If the record has an image , 'appres://...' will be changed to base64.

Then you could use this rule to check which column has image value.

vxiaochenmsft_3-1637639699292.png

 

Best Regards,

Wearsky

 

 

 

 

View solution in original post

2 REPLIES 2
v-xiaochen-msft
Community Support
Community Support

Hi @hadimarashy ,

 

I reproduced your problem.

This happens because "appres://" is just a reference. Regardless of whether the image/varbinary column in the database has a value, the reference will exist. So you can't use blank()/Isblank() to check if the image is blank.

 

You could use JSON function to solve it.

I did a test for you .

vxiaochenmsft_0-1637639469262.png

vxiaochenmsft_1-1637639539884.png

 

vxiaochenmsft_2-1637639565818.png

 

You could add a button to create a collection or variable.

ClearCollect(Col,ForAll(Gallery1.AllItems,JSON(ThisRecord.Image2.Image,JSONFormat.IncludeBinaryData)))

 

If the record has an image , 'appres://...' will be changed to base64.

Then you could use this rule to check which column has image value.

vxiaochenmsft_3-1637639699292.png

 

Best Regards,

Wearsky

 

 

 

 

hadimarashy
Frequent Visitor

Thank you @v-xiaochen-msft 

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

Check out the New Ideas Site

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

Top Solution Authors
Top Kudoed Authors
Users online (5,036)