Skip to main content

Notifications

Community site session details

Community site session details

Session Id : 7OzEhybDL/CkorDMTWpmWo
Power Apps - Building Power Apps
Unanswered

How to link a data table column to a form

Like (0) ShareShare
ReportReport
Posted on 1 Mar 2023 14:01:57 by 8

Hi All,

 

I have a data table display columns from two tables, below is the Query for this data table Items:

 

AddColumns('Resource Requests',
"Location",LookUp(RARPAnswers,'Answer ID'='Resource Requests'[@'Answer ID'].'Answer ID').'Preferred Location',
"Position Title",LookUp(RARPAnswers,'Answer ID'='Resource Requests'[@'Answer ID'].'Answer ID').'Position Title',
"Req Types",LookUp(RARPAnswers,'Answer ID'='Resource Requests'[@'Answer ID'].'Answer ID').'Request Type')

 

and the data table looks like this:

03011.png

 

Now I want to add a hyperlink on the ID, so when I click the ID, a page/form will show with more details information, all the information is from those two tables. May I know how to achieve this?

 

I set the OnSelect property of the ID column to this: Navigate(Form2,None), and Form2 item property is this : 'DataTable3.Selected', but currently there is some error report:

03012.png

Could anyone give me some suggestion? thank you so much!

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on 01 Mar 2023 at 16:25:42
    Re: How to link a data table column to a form

    @Kelvin_Zou

    You don't need a variable. Change your item property of the form to:

    LookUp ('Resource Requests' , ID=DataTable3.Selected.ID) 

  • SolTeferi Profile Picture
    on 01 Mar 2023 at 16:10:28
    Re: How to link a data table column to a form

    Hi @Kelvin_Zou ,

    It should work with that, but, I don't think you need to pass the context variable. You can directly set the text property of the label to:  DataTable3.Selected.'Position Title'.

    Also, please note that since the form is linked to a collection variable, it will not readily submit to your original data source.  If you want to submit the form to your original data source, you may need to use a patch function. If it is just for display purpose, you should be all good.

  • Kelvin_Zou Profile Picture
    8 on 01 Mar 2023 at 15:48:13
    Re: How to link a data table column to a form

    Thank you @SolTeferi , per your message, now I updated the Onselect property of ID like below, firstly define the collection 'detailForm' and then Navigate, I also send the context(the select ID) info in the Navigate function:

    ClearCollect(detailForm,AddColumns('Resource Requests',
    "Location",LookUp(RARPAnswers,'Answer ID'='Resource Requests'[@'Answer ID'].'Answer ID').'Preferred Location',
    "Position Title",LookUp(RARPAnswers,'Answer ID'='Resource Requests'[@'Answer ID'].'Answer ID').'Position Title',
    "Req Types",LookUp(RARPAnswers,'Answer ID'='Resource Requests'[@'Answer ID'].'Answer ID').'Request Type'));Navigate(Form3,None,{'Request ID':DataTable3.Selected.'Request ID'})

     

    So now when I come back to the form, I select the collection 'detailForm' as the datasource,  and I added a text label to show the data from datasource, like this:

     

    Kelvin_Zou_0-1677685596452.png

     

    How to receive the data with specified ID and show in the form? 

     

     

  • SolTeferi Profile Picture
    on 01 Mar 2023 at 14:46:23
    Re: How to link a data table column to a form

    Hi @Kelvin_Zou ,

     

    Your form's data source should be changed to the table after you added the columns. So, Please first make a collection variable. You can try adding the function below when you click on the ID of the table. 

     

     

    ClearCollect(varTable,
    AddColumns('Resource Requests',
    "Location",LookUp(RARPAnswers,'Answer ID'='Resource Requests'[@'Answer ID'].'Answer ID').'Preferred Location',
    "Position Title",LookUp(RARPAnswers,'Answer ID'='Resource Requests'[@'Answer ID'].'Answer ID').'Position Title',
    "Req Types",LookUp(RARPAnswers,'Answer ID'='Resource Requests'[@'Answer ID'].'Answer ID').'Request Type'))

     

     

    Then, change the data source of the form to varTable

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,743 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,089 Most Valuable Professional

Leaderboard
Loading started