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:
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:
Could anyone give me some suggestion? thank you so much!
You don't need a variable. Change your item property of the form to:
LookUp ('Resource Requests' , ID=DataTable3.Selected.ID)
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.
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:
How to receive the data with specified ID and show in the 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
WarrenBelz
146,743
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
66,089
Most Valuable Professional