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

Data from a table to a form

Hello community.

I have a table in which records are displayed in 3 columns. I also have a form in which I have 3 fields. Now I want to click on a data record in the table and the values from the 3 columns should each be displayed in the 3 fields of the form. How do I do that?

Thanks for your help.
Best regards RoScha

 

Example:

Table:

Column 1 | Column 2 | Column 3

AA            | BB            | CC

DD           | EE             | FF

 

[click on a record]  = Result

 

Form:

Field 1:

AA

 

Field 2:

BB

 

Field 3:

CC

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
eka24
Super User
Super User

Assuming the table connection to both the Form and the Datatable or Gallery are the same and they are on the do same screen do the following;

 

On the Items property of the Form, put;

Datatabl1.Selected

 

If the table is connected to a Gallery;

On the Items property of the Form, put;

Gallery1.Selected

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

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

Let me give further explanation. The formula will not work if the form is New Mode. Because New Mode means you want to enter NEW data or New Input.

 

So to solve your issue, what you have done already is ok. But in Addition to that;

Insert 3 Buttons On put the formula below on Each of them;

 

Button1

Newform (YourFormName)

 

Button2

Editform (YourFormName)

 

Button3

ViewForm (YourFormName)

 

Change 

YourFormName to the name of your form.

 

When you click any of the form the mode will change. So when you click on Editform button, the Datatable.Seleted will work

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

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

12 REPLIES 12
eka24
Super User
Super User

Assuming the table connection to both the Form and the Datatable or Gallery are the same and they are on the do same screen do the following;

 

On the Items property of the Form, put;

Datatabl1.Selected

 

If the table is connected to a Gallery;

On the Items property of the Form, put;

Gallery1.Selected

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

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

So I've tried the command. But at the beginning it didn't work, I am finally and rather by chance I decided to switch the standard mode from "New" to "Edited". And then it worked. Unfortunately, I am not yet clear about the consequences of the values in the standard mode. I still have to work that out.

Hello community.

 

There may already be a solution for my current problem, but I still find it difficult to search in the forum because English is not my mother tongue and I don't yet know exactly what to look for because PowerApps is still new to me.

 

What's my problem It is the continuation of my thread.

The Datatabl1 and the Form are on a screen. However, this form has two functions. On the one hand, you should be able to enter new data sets (New form mode) and, on the other hand, it should display data sets from Datatabl1 when you click on it. But the data record from Datatabl1 is only visible when the form mode is set to Edit.

 

Can I now also control this using a formula?

Does that mean I click on Datatabl 1 then the formmode changes into edit, otherwise it is New in the standard.

 

Is that possible? If yes how?

 

Best regards

RoScha

Let me give further explanation. The formula will not work if the form is New Mode. Because New Mode means you want to enter NEW data or New Input.

 

So to solve your issue, what you have done already is ok. But in Addition to that;

Insert 3 Buttons On put the formula below on Each of them;

 

Button1

Newform (YourFormName)

 

Button2

Editform (YourFormName)

 

Button3

ViewForm (YourFormName)

 

Change 

YourFormName to the name of your form.

 

When you click any of the form the mode will change. So when you click on Editform button, the Datatable.Seleted will work

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

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

@ eka24: thank you very much for your help.

I still have another idea how I want to set up my screen. 

And now it's about how I can combine commands with each other.

 

Based on the current solution, I now have a New button (the current formula is: Property OnSelect = NewForm (frm_scrNeueFZ))

To do this, I set the form in Visible to false.

 

Now I would like to achieve that when I click on the New button that both the form in Visible is set to true, i.e. you can now see the form and NewForm (frm_scrNeueFZ) is executed at the same time.

 

How can I combine these two commands with each other because I suspect that both commands should be set for the OnSelect property right?

 

Best regards
RoScha

Yes both have to be Onselect of the button. But you didn't say anything on how you hide the form or set the form visible to false?.

 

Try this;

If you don't have a way of hiding the form;

1.Onvisible of the screen:

UpdateContext({HideForm:false})

 

2. Visible of the Form:

HideForm

 

3. New form button Onselect;

UpdateContext({HideForm:true});

NewForm (frm_scrNeueFZ))

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

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.

 

Hello @eka24 .

So this solution has not yet worked for me. But it probably has to do with the fact that I have not yet understood the solution correctly or that something is still wrong.

 

But I would like to answer your initial question.

I simply set the visibility to False in the properties of the form (on the right of the screen). And now I wanted to achieve that when I click the New button, the shape becomes visible and the status is New.

 

Best regards
RoScha

I simply set the visibility to False in the properties of the form (on the right of the screen). And now I wanted to achieve that when I click the New button, the shape becomes visible and the status is New.

 

Just using the property to false is not good enough especially if you want it to occur again anytime you login. 

What I have given in my previous post is that when ever you go to the screen, the form visible will be false. Then when you click the New button visible will be true.

 

Did you try what I gave?. Try and give feedback. 

 

What you have done is manual. That's users apart from you cannot go to property pane and make it visible or not

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

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
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Microsoft Ignite 768x460.png

Find your focus

Explore the latest tools,training sessions,technical expertise, networking and more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (1,579)