cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Big_S
Helper V
Helper V

Incompatible Type. We can't evaluate your formula because the values being compared in the formula aren't the same type.

Hi Everyone,

Can anyone tell me how to solve this? I'm calling a table from database to display in power-apps table below is my formula and provided attachments. 

Sort(Filter('[dbo].[RequestTrail]', Active = 1 && DateValue(Text(TransactionDate),"en") >= DateValue(Text(AuditTrailFromDatePicker1.SelectedDate))
&& DateValue(Text(TransactionDate),"en") <= DateValue(Text(AuditTrailToDatePicker1_1.SelectedDate)) ),SequenceNo, Ascending)

Thank you so much.

 

 



2 ACCEPTED SOLUTIONS

Accepted Solutions
yashag2255
Dual Super User II
Dual Super User II

Hi @Big_S 
 
Can you confirm that your Active field in the db table is a Number field? I replicated the formula in my app and it seems like the date filter works just fine. 
 
Thanks,

View solution in original post

yashag2255
Dual Super User II
Dual Super User II

@Big_S 

 

What is the type of Active field in you sharepoint list, can you please confirm? 
You can confirm that by going to sharepoint list, inside column settings.
If it is Yes/No field, then you need to send data in the form of boolean i.e. true/false
MicrosoftTeams-image (60).png

Hope this Helps!

View solution in original post

10 REPLIES 10
yashag2255
Dual Super User II
Dual Super User II

Hi @Big_S 
 
Can you confirm that your Active field in the db table is a Number field? I replicated the formula in my app and it seems like the date filter works just fine. 
 
Thanks,

View solution in original post

I also try another table the formula works fine, I'll check the active and update you Thank you so muchhhh ❤️

Yes!! you're right its a number? do I need to convert it to text? how to do it?

yashag2255
Dual Super User II
Dual Super User II

Hi @Big_S , 

 

You don't have to convert that, the number comparison works fine with the filter command.

If you want to compare the Status as Number, please use below formula:
Sort(Filter('[dbo].[RequestTrail]', Value(Active) = 1 && DateValue(Text(TransactionDate),"en") >= DateValue(Text(AuditTrailFromDatePicker1.SelectedDate))
&& DateValue(Text(TransactionDate),"en") <= DateValue(Text(AuditTrailToDatePicker1_1.SelectedDate)) ),SequenceNo, Ascending)

 

If you want to do a string comparison:
Sort(Filter('[dbo].[RequestTrail]', Text(Active) = "1" && DateValue(Text(TransactionDate),"en") >= DateValue(Text(AuditTrailFromDatePicker1.SelectedDate))
&& DateValue(Text(TransactionDate),"en") <= DateValue(Text(AuditTrailToDatePicker1_1.SelectedDate)) ),SequenceNo, Ascending)

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Hi @yashag2255 

 

I tried the first formula i got this error, below I used gallery to view the data for checking database connection only.
The second formula no error but no display

s1.png

yashag2255
Dual Super User II
Dual Super User II

Hi @Big_S 
 
From what I see as per your screenshot, your Status field is not of type Integer, it holds values, request and approved, but here in the formula, you are comparing it with a number.
 
Conversion to integer failed because "Request" and "Aproved" can not be converted to type interger.
 
While, conversion to string getting no records, because there is no such entry where status is one.
 
Hope this Helps!

hi @yashag2255 

 

I think the Active is not an integer am i right?

s2.png

yashag2255
Dual Super User II
Dual Super User II

@Big_S 

 

What is the type of Active field in you sharepoint list, can you please confirm? 
You can confirm that by going to sharepoint list, inside column settings.
If it is Yes/No field, then you need to send data in the form of boolean i.e. true/false
MicrosoftTeams-image (60).png

Hope this Helps!

View solution in original post

Hi @yashag2255 

 

Active is bit data type


s3.PNG

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (43,398)