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
Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (6,386)