cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Regular Visitor

Creating new record from TextInput using Patch() error "A value must be provided for item"

Hi,

 

I am trying to do something as simple as creating a new record in a single column table in an excel spreadsheet from a TextInput, but am getting the error "A value must be provided for item".

 

The syntax I am trying to use is

Patch(Table,Defaults(Table),{ Column: TextInput.Text})

As a test, I tried

Patch(Table,Defaults(Table),{ Column: "test"})

which created the record succesfully.

 

Why doesn't it work when I replace "test" with TextInput.Text?

 

Thanks

5 REPLIES 5
Highlighted
Microsoft
Microsoft

Re: Creating new record from TextInput using Patch() error "A value must be provided for item"

Hello @anklez ,

Not sure why you're getting the error. Can you please try the following?:

Patch(Table,Defaults(Table),{ Column: Text(TextInput.Text)})
Highlighted
Regular Visitor

Re: Creating new record from TextInput using Patch() error "A value must be provided for item"

Hi @dinusc

 

For some reason, your suggestion creates a blank record instead of using the text from TextInput

Highlighted
Microsoft
Microsoft

Re: Creating new record from TextInput using Patch() error "A value must be provided for item"

Is it possible that you have some column-level format restriction set up in your Excel file?

Can you drop a test label on the screen and bind it to Text(TextInput.Text)? Does it show data properly? If so then I would suggest to perofm another test with a brand new Excel file  with a test table with just a couple of columns. If you can successfully Patch data to that file then you can review your original file.

Highlighted
Regular Visitor

Re: Creating new record from TextInput using Patch() error "A value must be provided for item"

I am able to Patch a record using 

Patch(Table,Defaults(Table),{ Column: "test"})

 

which tells me there shouldn't be anything wrong with the excel file? The issue only appears when I try to Patch text from TextInput

 

 

I added a test label to the Screen bound to Text(TextInput.Text) and it worked as expected. 

 

I will try a new excel file later on today but I'm not confident it will fix it. 

Highlighted
Microsoft
Microsoft

Re: Creating new record from TextInput using Patch() error "A value must be provided for item"

If new Excel file addresses the issue then I would check the previous file to see if there're any column restrictions, such as enforced format (text, currency, number of decimals and etc.).

Helpful resources

Announcements
secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (7,882)