cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
BGR_
New Member

Patch collection with TextBox input in Gallery - Error: Name isn't valid. 'Text' isn't recognized

Hi!

 

I'm having trouble updating my collection named "local_Sjekkliste". I have a text box input control inside a gallery. I want the user to fill the text box and then have the app update a record field corresponding to the column "Kommentar" in the collection.

 

Here is my solution using OnChange property for the text box:

 

 

Patch(
    local_Sjekkliste,
    ThisItem,
    {Kommentar:Self.Text}
)

 

 

 With this formula I get the error message: "Name isn't valid. 'Text' isn't recognized". Why is that? I have seen many examples of people using similar syntax - textBoxName.Text seems to contain the user input in the examples I have seen.

 

 I am using power apps for teams, if that matters. 

 

Please help.

1 ACCEPTED SOLUTION

Accepted Solutions
BGR_
New Member

I just figured this out.. I'm using the "Text Box" control. All the examples I have seen uses the "Text input" legacy control witch is why the properties are different. I changed to the classic (legacy) "Text input" control and everything is working fine, it seems to behave better too! 

 

I had to go into the setting and turn on classic controls. 

 

Thank you for your time @phipps0218 

View solution in original post

10 REPLIES 10
phipps0218
Memorable Member
Memorable Member

Rather than self.text can you try the name of the textbox.text. If that works then I think I know why. If not then I have another suggestion.

 

Please Accept as Solution if it solves your question. Or just give it a Thumbs Up if it is helpful as can help others.

LinkedIn: https://www.linkedin.com/in/charlie-phipps-%F0%9F%91%A8%E2%80%8D%F0%9F%92%BB-91338715b/
YouTube: https://www.youtube.com/channel/UChmFBGU1YKIU91sNMQ7buGg
Twitter: https://twitter.com/phipps0218

BGR_
New Member

@phipps0218 , that produced the same error.  What's the other suggestion?

phipps0218
Memorable Member
Memorable Member

What data type is Kommentar?

BGR_
New Member

It's text. When using the following code it patches "OK" every time. 

 

Patch(
    local_Sjekkliste,
    ThisItem,
    {Kommentar:"OK"}
)
phipps0218
Memorable Member
Memorable Member

@BGR_ is this a text input or a rich text editor field?

A text input. 

phipps0218
Memorable Member
Memorable Member

If you create a seperate label and in the label put textbox name .text does the text appear?

No, but the 'Text' property doesn't appear to exist for my text box. It seems it only has a 'Value' property. I can use it as shown below.

 

BGR__0-1657181561866.png

 

BGR__1-1657181849852.png

 

 

 

BGR_
New Member

I just figured this out.. I'm using the "Text Box" control. All the examples I have seen uses the "Text input" legacy control witch is why the properties are different. I changed to the classic (legacy) "Text input" control and everything is working fine, it seems to behave better too! 

 

I had to go into the setting and turn on classic controls. 

 

Thank you for your time @phipps0218 

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 (4,828)