I would like to know the code of copying/adding the select value on Screen 1 (hyperlink) to the search box on screen 2?
Solved! Go to Solution.
Just to add another suggestion onto @poweractivate's answer,which is completely fine, another way is to amend your call to navigate so that it passes the selected field value to ScreenStaffDetails.
Navigate(ScreenStaffDetials,
ScreenTransition.Cover,
{locSelected:DataTable1.Selected.AttendedBy}
)
This formula passes the selected value in a variable called locSelected. You should use the Intellisense in the editor to confirm that DataTable1.Selected.AttendedBy is valid.
You can then set the Default property of your textbox on ScreenStaffDetails to locSelected.
On Default property of TextBox put this
"https://example.com"
To go further though
Your hyperlink appears to be inside a Table or Collection. Then you need to do
First(SomeTable).SomeFieldWithHyperLinkInSideOfIt
Above is rough idea, you must check the detail for yourself.
See if it helps @rehankazi
@poweractivate ,thanks
But I don't understand, as I have to use navigate function as well, so my code should look like
Navigate(ScreenStaffDetials,ScreenTransition.Cover................
I am not sure what code should I put after NAVIGATE, as I want the value to be copied on the second screen text box which has the search function also for second screen as well.
Then you need variable.
on Screen1 where that Table is you need to put this either OnVisible of the Screen,
Set(myVariable01,First(SomeTable).SomeFieldWithHyperLinkInSideOfIt)
or instead, just BEFORE the Navigate in your Formula property where you already put it:
Set(myVariable01,First(SomeTable).SomeFieldWithHyperLinkInSideOfIt);Navigate(ScreenStaffDetails....)
On Screen 2 where the TextBox is in Default property put simply this now
myVariable01
Check if it helps @rehankazi
I am still getting an error
For
First(DataTable1)
Instead of DataTable1 you should put there the original source of the DataTable1 such as the Table or Collection directly - see if it helps. You can try and check the DataTable1 Items property to find out what this was.
I got the code without error, but it does not work. It does not copy the value of my hyperlink on the screen 2 TextBox
Just to add another suggestion onto @poweractivate's answer,which is completely fine, another way is to amend your call to navigate so that it passes the selected field value to ScreenStaffDetails.
Navigate(ScreenStaffDetials,
ScreenTransition.Cover,
{locSelected:DataTable1.Selected.AttendedBy}
)
This formula passes the selected value in a variable called locSelected. You should use the Intellisense in the editor to confirm that DataTable1.Selected.AttendedBy is valid.
You can then set the Default property of your textbox on ScreenStaffDetails to locSelected.
@rehankazi I think the answer from @timl is better.
I also like the select of the DataTable which I didn't mention in mine:
DataTable1.Selected.AttendedBy
I think you should go ahead and consider to do it like that too @rehankazi
Note that like @timl said the above is not intended to be exact, you need to check on DataTable1.Selected.AttendedBy - if it is not correct, you need to put whatever the correct one is for you. You can type YourDataTableName.Selected. and then see in the IntelliSense what shows up and start typing the name of that Column.
Thank you so much @poweractivate you have been a great help.....have a great day!!
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
User | Count |
---|---|
197 | |
69 | |
47 | |
36 | |
25 |
User | Count |
---|---|
239 | |
109 | |
89 | |
88 | |
66 |