Home > Software design >  How do I take the input values from one screen to a gallery in another screen PowerApps?
How do I take the input values from one screen to a gallery in another screen PowerApps?

Time:02-22

I am using PowerApps Canvas for the first time. I have created two screens. One has a gallery connected to an excel sheet. It displays the table contents from the excel file. And the second screen has some input text fields. I want to enter values in these fields and click on submit, so that when I go to the other screen I can see this new record in the gallery. I want to use the collect function for the submit button but it is showing problem with using Record1 (name of the global variable in which I am storing the excel table). It says the specified data source cannot be used.

Collect(Record1,
  {
      AgentName:TextInput1.Text, 
      ID:TextInput4.Text, 
      Shift:TextInput2.Text, 
      Weekoff:TextInput3.Text
  }
)

I am setting Record1 as a global variable in the onStart property.

Set(Record1,Table1);

Edit: I ran onStart and the error is not there but new record isn't being displayed on the gallery. There is an error with setting the global variable Unexpected Characters. The formula contains 'Ident' where 'Data' is expected.

CodePudding user response:

Making a global variable wasn't required. I just used the excel table directly in the other screen and the collect function works now.

CodePudding user response:

You want to store your input into your excel right? You need patch instead of collect. Collect is for local storage, patch creates an item in the datasource.

  • Related