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

Use Save Button for all Text Inputs to be posted to Excel

z3.PNG

 

Every text input on the screen, is a separate field because often through the app space had to be made for instructions & to help so things make sense of things.

 

I used to know how to do this but it's been awhile.

 

The text input Default are set to be individual excel table records.   To keep the calls down to a minimum, how do I use the Save button to update all the excel records at the same time?  With a twist of course. We always need a twist. Right!? 

 

It's a canvas app, with a drop down ( 'House DropDown' )in the upper left side that selects which row in a 200 column excel table the rest of the app uses.  The records output into formulas, inputs, and into individual Text fields. 

 

So... you choose from Dropdown1, the option of Building #2

 

Then all the output text fields in the app, draw from the 2nd row in the excel table.  So for instance.  App would be showing "Princess Penelope" in the First Name(s) text input, if that is what was in the Building #2 row - First Name(s) column.

 

Text: 'House DropDown'.Selected.First_Names

 

Is there a way to use - 'House DropDown'.Selected.First_Names - in the equation you posted?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Yes just replace Textbox1.Text with 

House DropDown'.Selected.Volume

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

View solution in original post

14 REPLIES 14
Highlighted
Super User III
Super User III

If you are creating new rows

Patch(ExcelTable,

Defaults(ExcelTable),
{ColumnName1: Textbox1.Text ,
ColumnName2: Textbox2.Text },
ColumnName3: Textbox3.Text})

 

If you are updating record:

 Patch( ExcelTable,
First( Filter( ExcelTable, ID = Value(Textbox1.Text) ),
{ColumnName1: Textbox1.Text ,
ColumnName2: Textbox2.Text },
ColumnName3: Textbox3.Text})

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Highlighted

@eka24 

 

I will add to the post.   

 

It's a canvas app, with a drop down ( 'House DropDown' )in the upper left side that selects which row in a 200 column excel table the rest of the app uses.  The records output into formulas, inputs, and into individual Text fields. 

 

So... you choose from Dropdown1, the option of Building #2

 

Then all the output text fields in the app, draw from the 2nd row in the excel table.  So for instance.  Volume is outputting "12 Litres" from the Volume column, using this in the label:

 

Text: 'House DropDown'.Selected.Volume

 

Is there a way to use - 'House DropDown'.Selected.Volume - in the equation you posted?

 

 

 

 

Highlighted

Yes just replace Textbox1.Text with 

House DropDown'.Selected.Volume

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

View solution in original post

Highlighted

@eka24 

 

I'm gettting an error. I think it's from what I colored red?

 

 

Patch('Database Output',
First( Filter( 'Database Output', ID = Value('House DropDown'.Selected) ),
{'House DropDown'.Selected.First_Names },
{'House DropDown'.Selected.Last_Names},
{'House DropDown'.Selected.Email},
{'House DropDown'.Selected.Phone},
{'House DropDown'.Selected.Address},
{'House DropDown'.Selected.Town_City},
{'House DropDown'.Selected.Province_State},
{'House DropDown'.Selected.Postal_Zip})

Highlighted

Yes, one parameter is not added.

Either ID = Value('House DropDown'.Selected.ColumnName) ),

 

Or

 

ID = Value('House DropDown'.Selected.Value) ),

 

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Highlighted

@eka24 

 

I'm still getting the error using this but now it's a Value error. " The function 'Value' has some invalid arguments."

 

Patch('Database Output',
First( Filter( 'Database Output', Value('House DropDown'.Selected.ColumnName) ),
{'House DropDown'.Selected.User_first_names },
{'House DropDown'.Selected.User_Last_Names},
{'House DropDown'.Selected.User_Email},
{'House DropDown'.Selected.User_Phone},
{'House DropDown'.Selected.User_Address},
{'House DropDown'.Selected.User_Town_City},
{'House DropDown'.Selected.User_Province_State},
{'House DropDown'.Selected.User_Postal_Zip})

Highlighted

The value outside is used for number field. If it not a number field use:

Either ID = 'House DropDown'.Selected.ColumnName),

 

Or

 

ID ='House DropDown'.Selected.Value),

 

In this case ID is not a number field?

 

If you still have issues, show a screenshot of the Dropdown formula and if possible, sample of the table.

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Highlighted

@eka24 

The dropdown basic Data Items & Value. 

ID Sample 2.PNG

 

Excel Table

 

ID Sample.PNG

Highlighted

Please change all the Textbox names in the formula below to reflect the actual names of the textbox in your App:

 

Also follow and add all the other column into the formula

Patch('Database Output',

Defaults(ExcelTable),
{Company: Textbox1.Text ,
Firstname: Textbox2.Text },
Email: Textbox3.Text,

Country: CountryDropdown.Selected.Country})

 

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (11,539)