web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Whats the code to copy...
Power Apps
Answered

Whats the code to copy the hyperlink value on screen1 to Screen 2 in search text box?

(1) ShareShare
ReportReport
Posted on by 70

rehankazi_0-1634823154877.png

I would like to know the code of copying/adding the select value on Screen 1 (hyperlink) to the search box on screen 2?

Categories:
  • poweractivate Profile Picture
    11,078 Most Valuable Professional on at

    @rehankazi 

     

    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 

     

  • rehankazi Profile Picture
    70 on at

    @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.

     

  • poweractivate Profile Picture
    11,078 Most Valuable Professional on at

    @rehankazi 

    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 

  • rehankazi Profile Picture
    70 on at

    I am still getting an error

     

    rehankazi_0-1634829229216.png

     

  • poweractivate Profile Picture
    11,078 Most Valuable Professional on at

    @rehankazi 

     

    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.

  • rehankazi Profile Picture
    70 on at

    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

  • Verified answer
    timl Profile Picture
    37,320 Super User 2026 Season 2 on at

    @rehankazi 

    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.

     

  • poweractivate Profile Picture
    11,078 Most Valuable Professional on at

    @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. 

     

     

     

  • rehankazi Profile Picture
    70 on at

    Thank you so much @poweractivate you have been a great help.....have a great day!!

  • rehankazi Profile Picture
    70 on at

    This works very well, i am glad you showed me this solution.........I hope it will works for multi column.

     

    I am very grateful to you for showing the solution....have a great day!!

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 339 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 289

#3
Mohsin Ali Profile Picture

Mohsin Ali 228

Last 30 days Overall leaderboard