cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Anonymous
Not applicable

Carrying Information from the Item Selected on the BrowseScreen to another Table

My powerapps is connected to an Excel file on my OneDrive account. On the browse screen there is a list of school subjects. When you click on one, you go to the DetailScreen with the details. I added a Sign Up button, that takes you to a third screen, a form where you type your name and number. The problem is that this info is going to be saved on a separate table from the list of subjects. I need to carry the "SubjectName" item to the "ListsOfSignUps' table, along with the students name and number.

Already tried adding 2 data sources to the same screen, but powerapps doesnt let me do that.

Any suggestions? 

 

Thanks!

8 REPLIES 8
Highlighted
Community Champion
Community Champion

Re: Carrying Information from the Item Selected on the BrowseScreen to another Table

Hi @Anonymous

 

You can reference the subject that you select in the first screen by using this anywhere else in the app:

GalleryXYZ.Selected.Subject

Where GalleryXYZ is the name of the gallery in the first screen and Subject is the name of the field containing the name of the school subjects.

 

You can experiment with this by placing a text box in the third screen and set its Text property to the code above.

 

Please let me know how you get on.

 

PS Data sources are not added to screens, they are added to the app as whole.

Highlighted
Anonymous
Not applicable

Re: Carrying Information from the Item Selected on the BrowseScreen to another Table

Hi @Meneghino! , I did what you said (GalleryXYZ.Selected.Subject) and the name of the subject its on the screen now! Thanks a lot!

 

But when i submit the form, the subject name is not getting added to the Table, only the other information!

Highlighted
Community Champion
Community Champion

Re: Carrying Information from the Item Selected on the BrowseScreen to another Table

Ah, PowerApps forms... I try to avoid them since they work well if you need just standard behaviour but difficult to customise.

 

I suggest you use a Patch or a Collect statement to submit the new data to the source.

Here is how you do it:

1) Start the third screen from zero again

2) Place two text input controls on the screen (called TextInputStudentName and TextInputStudentNumber)

3) Place a button and set its OnSelect property to this:

Patch(ListsOfSignUps, Defaults(ListsOfSignUps), {StudentName: TextinputStudentName.Text, StudentNumber: Value(TextInputStudentNumber.Text), Subject: GalleryXYZ.Selected.Subject})

PS I am assuming the student number column is number type, if it is text then just omit the Value() function

 

Please try it, once you learn to Patch you never go back to forms

Highlighted
Anonymous
Not applicable

Re: Carrying Information from the Item Selected on the BrowseScreen to another Table

Hey @Meneghino, i did not understand where exactly I should place the button, on the third screen? The same button as the submit? Or the button on the second screen that creates a new form? 

Thanks for the help!

Highlighted
Community Champion
Community Champion

Re: Carrying Information from the Item Selected on the BrowseScreen to another Table

Hi @Anonymous

You can start the third screen from zero (or if you prefer just create a new screen).

To start with you do not need anything on the screen except for the two text inputs and the button.

Highlighted
Anonymous
Not applicable

Re: Carrying Information from the Item Selected on the BrowseScreen to another Table

@Meneghino I Tried it, the error now its on the first update textfield on the button, already tried changing the order of the fields, changing every single ";" for "," , Already tried pretty much everything!


Patch(Inscricoes;Defaults(Inscricoes);{NomePessoa:TextInputNomePessoa.Text,RE: TextInputRE.Text, Setor:TextInputSetor.Text,NomeCurso: GaleriaDeCursos.Selected.NomeCurso})

 

The code is in portuguese, here's the translation:

Inscricoes-> ListOfSignUps

NomePessoa -> StudentName

RE -> StudentNumber

Setor-> Area of knowledge(this is a new text field I added, all the other stuff is already done, just missing this piece of code)

NomeCurso->Subject

GaleriaDeCursos-> GalleryXYZ on your code

 

 

Highlighted
Community Champion
Community Champion

Re: Carrying Information from the Item Selected on the BrowseScreen to another Table

Hi @Anonymous, Portuguese is not a problem, I am Italian.

 

For Portuguese locale, compared to English you need to substitute all , with ; and all ; with ;; (yes, double semi-colon)

 

Hence the code that should work in your case is:

Patch(Inscricoes; Defaults(Inscricoes);{NomePessoa:TextInputNomePessoa.Text; RE: TextInputRE.Text;  Setor:TextInputSetor.Text; NomeCurso: GaleriaDeCursos.Selected.NomeCurso})

Please let me know how you get on.  If there are issues, please let me know the type of column (i.e. number, text, choice, lookup etc.) for each of the below:

 

NomePessoa ->

RE ->

Setor->

NomeCurso->

Highlighted
Anonymous
Not applicable

Re: Carrying Information from the Item Selected on the BrowseScreen to another Table

@Meneghino Thanks A LOT! Now its working!

NomePessoa, Setor and NomeCurso are text fields

RE is a number field(already did the RE: Value(TextInputRE.Text) thing)

If you can help me, i want to know how I can send alerts, like, if the form was sent, an "Form Sent" message should pop up, if it wasnt, an error msg should appear. Or Maybe placing an "ONLY NUMBERS" condition on the RE field....

 

 

 

Helpful resources

Announcements
Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

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

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (5,631)