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 Apps
Answered

Temp Tables

(0) ShareShare
ReportReport
Posted on by 20

Hi All 

 

If you create a temp table for example 

 Table({Data:WG_Number},{Data:Email_Line},{Data:'Username & Surename'}); Navigate(User_View,ScreenTransition.Fade)

 

How do you access this temp table later on in a different screen 

Categories:
  • timl Profile Picture
    37,287 Super User 2026 Season 2 on at

    Hi @Andries

     

    It's not possible to access the result from the Table function from a different screen.

    With PowerApps, a collection is the data structure that you would use to store and retrieve data values from multiple screens.

    The main function you would use is called ClearCollect.

    https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-clear-collect-clearcollect


    Here's the syntax you would use to add records to a local collection called MyTempTable.

    ClearCollect(MyTempTable,
     {Data:WG_Number},{Data:Email_Line},{Data:'Username & Surename'}
    )


    Note that if WG_Number and Email_Line are text input controls, you could access these directly from your User_View screen. This might negate the need for you to use collections all together.

  • Andries Profile Picture
    20 on at

    @timl

     

    Thanks for the reply. 

     

    If you will permit let me pick your brain then as my own is picked clean 

    To give you some info on the problem faced 

     

    I have three screens currently in my APP 

     

    1] Welcome screen 

     

    A] Button  for submission - If(!IsBlank( Search_me.Text ), Navigate( 'User search_1', ScreenTransition.Fade ) )This works fine 

     

    B] Search_Me - Text input - This collects a employee number from the user for refrance against a DB - This Works fine 

     

    2] User search_1 

     

    A] Gallery 5 - Search('[public].[employee_data]',Search_me.Text,"wg_number") - This uses the number inputed by the user and pulls there info onto screen - This works fine 

     

    B] There are three Labes that display the user data. WG_number, Email_Line,Username & Surename - This displays but it might be the source of my problem. The DATA is set to "ThisItem.user_name_surename" and show correclty. 

     

    Now I want to pass WG_number, Email_Line and Username to the next screen ( User_View).  This is just to make sure they are making a submission on there own names so purely decorative. 

    Under User _View 

     

    I have the above info as lables but I cant get the data to pull though consistantly. Meaning, it will work once, then If i restart  the app with diffrent numbers ( that live in my DB) the info does not pull though.  Any ideas ?

     

    Thanks for the help on this. 

     

     

     

     

     

  • timl Profile Picture
    37,287 Super User 2026 Season 2 on at

    Hi @Andries

    Let's assume that you add a button to the item template of Gallery5 that navigates the user to the User_View screen.

    When the user clicks this button, the associated row in Gallery5 will become the selected row. On your User_View screen therefore, you can display your data using syntax that looks like this:

    Gallery5.Selected.WG_number

    Hopefully, that gives you enough to progress. But let us know if it doesn't work.

  • Andries Profile Picture
    20 on at

    Hi 

     

    Thanks for the Reply again 

     

    No it does not work or I am placeing it wrong. 

     

    Under User search_1 , I have a submit button called Submit (  Navigate(User_View,ScreenTransition.Fade). This goes to 

    Userview correctly.  But now under User_View I need to populate User_display, Email Address, Wg_Number_Display 

     

    See pictures attached 

    example.pngexample2.png

  • timl Profile Picture
    37,287 Super User 2026 Season 2 on at

    Hi @Andries

     

    Thanks for the screenshots. For the technique that I mentioned, your submit button needs to be a child of Gallery5. This picture hopefully illustrates what I mean.

     

     

    GalleryChild.JPG

     

    Because your sumbit button is outside the gallery, we'll need to do this in a different way.

     

    If the wg_number column in your [employee_data] table stores unique values, and Gallary5 will only show 1 record, you can add code to your submit button that stores the first record in a variable, and you can then refer to this in your User_View screen. Here's the formula you would add to your submit button.

     

     

    ClearCollect(FirstRecord,
     First(Search('[public].[employee_data]',Search_me.Text,"wg_number")
    ); 
    Navigate(User_View,ScreenTransition.Fade)

     

    On your User_View, you can then use the syntax FirstRecord.User_name etc to display the required details.

     

     

  • Andries Profile Picture
    20 on at

    Hi I think i understand.

     

    So this is my syntax i used on the submit button

     "ClearCollect(Collection1,First(Search('[public].[employee_data]',Search_me.Text,"wg_number") ));Navigate(User_View,ScreenTransition.Fade) "

    Just some clean up on this. 

     

    I take it Collection 1 is the variable name ? 

     

    Lastly 

     

    "In your User_View, you can then use the syntax FirstRecord.User_name etc to display the required details." 

     

    My sintax should be Collection1.User_name.wg_number ? 

    I seem to be missing somthing to complete that syntax 

     

     

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

    Oh, apologies. What I was intending to say was to use the Set function like so:

     

    Set(FirstRecord,
     First(Search('[public].[employee_data]',Search_me.Text,"wg_number")
    ); 
    Navigate(User_View,ScreenTransition.Fade)

    The first argument to Set defines the variable name, which in this example is FirstRecord. Hopefully, this code will work for you now.

  • Andries Profile Picture
    20 on at
    Hi thanks I am being daft. I attached screen shorts again. I have amended the code on the Button under user search _1 as you suggested and it works. But What should the syntax be under User view to retrieve the info. Thanks for your patience and help .
    User search_1 .png
    User view .png
  • Andries Profile Picture
    20 on at

    Hi 

     

    i figured it out. 

     

    it's Firstrecord1(variable name) . record ( WG_Number) 

     

    Works 

     

    Thank you again you were fantastic 

  • timl Profile Picture
    37,287 Super User 2026 Season 2 on at

    Thanks Andries, glad you figured it out!

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 409 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 252 Most Valuable Professional

Last 30 days Overall leaderboard