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

error does not match the expected type

I'm trying to make powerapp project but there is error message I couldn't solve I think its related to sharepoint file? Please I need help asap. 

 

ashj100_1-1656583544589.png

 

ashj100_0-1656583448376.png

 

 

 

2 ACCEPTED SOLUTIONS

Accepted Solutions

@ashj100 ,

I can fix that bit of code - you simply need to put

'Reserved By': currentUser.FullName

but I suspect that if this is a downloaded app, there will be somewhere else expecting a Person column, so I sugest you make it one of these.

 

EDIT: I see @timl posted about 30 seconds before me with the same answer

View solution in original post

timl
Super User
Super User

@ashj100 

As that column in now a person column, you'll have to change the syntax in your call to Filter to reference the Email property of 'Reserved By' like so.

 

'Reserved By'.Email = currentUser.Email && 'Check Out From' >= Today()

 

View solution in original post

16 REPLIES 16
WarrenBelz
Super User
Super User

@ashj100 ,

You have an equals = sign in the middle of curr=entUser.Email

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Visit my blog Practical Power Apps

same error message 😞 

timl
Super User
Super User

@ashj100 

The error message says 'ReservedBy' does not match the expected type 'Text'.

Your formula sets 'Reserved By' to a record value, so if you replace that line with a text assignment like so, that should resolve the error.

'Reserved By': currentUser.FullName

@ashj100 ,

Your syntax on the Person column 'Reserved By' is structurally correct, so it has to be one of your values referenced. You are patching from (I assume) a Variable called currentUser - when you choose View > Variables, what is in it ?

Also is 'Reserved by' a Person column ?

record 

ashj100_0-1656588360937.png

 

 

@ashj100 ,

So is 'Reserved By' definitely a Person column and what part is showing the error? I will be offline now due to time zone - I think @timl is on the right track here.

the idea is to click confirm button to save the reservation on sharepoint list in this part the error msg as shown in first picture appear with patch. 

I took the source code from github it works with data linked from the author organization, but when I linked it to my site organization the error msg happens. 

ashj100_0-1656588950291.pngashj100_1-1656588984098.png

 

 

 

ashj100
Frequent Visitor

can you please check my latest reply 

timl
Super User
Super User

@ashj100 

Going back to @WarrenBelz's question, is 'Reserved By' a person column in your SharePoint list?

Judging by the error message, it appears that 'Reserved By' might be defined as a text column in SharePoint, which would explain the error.

Helpful resources

Announcements
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 (1,775)