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 / Use ThisItem between s...
Power Apps
Answered

Use ThisItem between screens

(0) ShareShare
ReportReport
Posted on by 278

Canvas App

Independent Inputs

 

Here is 2 screens.... I need to get the questions screen to match whichever item is gallery selected.

 

I have tried setting a global variable using Set(VariableName, ThisItem) & found that did nothing.


I don't understand how the gallery ThisItem can be used as a way to even get an independent label on the same page to populate with it either, so I am thinking it doesn't work like drop down selections do.

 

Please help... I need to get the  form page to work, including have the Save Button know where to post it. 

 

Y.PNGz.PNG

Categories:
  • Verified answer
    BusyIntelligence Profile Picture
    321 on at

    Not sure if I understand you well, but I think ThisItem can only b used within a specific row of the gallery.
    If you want to refer to an item in another gallery you could use the Selected status.
    So, e.g., if the gallery with the bulbs is called glyBulbs, when the user selected one of the bulbs you can refer to that item (even from another screen) with:

    glyBulbs.Selected.BulbType or whatever field or object is on that line of the gallery.

     

    This what you mean?

    Kind regards,

    Maurits

     

  • Verified answer
    mdevaney Profile Picture
    29,993 Moderator on at

    @Humanity 

    To explain how ThisItem works:

     

    If you put this code in the OnSelect property of your gallery or a button in your gallery...

     

    Set(VariableName, ThisItem)


    Then put this code in the Text property of a label to see the ID number of what you selected

     

    VariableName.ID

     

    If you want to filter based on some column in ThisItem you would use this code in the Items property of the question gallery

     

    Filter(question_datasource_name, QuestionTopic = ThisItem.QuestionTopic)

     

    If you need something more specific to your problem please post the data behind it.

     

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

  • Humanity Profile Picture
    278 on at

    @mdevaney

    Sorry you were correct... I must of had a delay the first time around.   But it won't let me use them for saving.

     

    @Maurits 

    Your way of doing it does not allow for OnSelect to work. I expected it to, but it runs into the same problem the ThisItem has when taying to make a save button out of it.

     


    Do either of you know how to generate a unique ID column, so I can make up for MS not letting Sheets work fully?

     

     

  • Humanity Profile Picture
    278 on at

    @Mauz is correct !!! They made us a shortcut.

     

    Thank you Mauz

  • Humanity Profile Picture
    278 on at

    @mdevaney @Maurits 

     

    Am I missing something?

     

    x.PNG

  • BusyIntelligence Profile Picture
    321 on at

    Hi, when you need a unique id you could use the GUID() function. When you use GUID() just like this, without anything between the brackets, you get a unique GUID .

  • Humanity Profile Picture
    278 on at

    I like the idea.  To use it I need to make some way to tell if a record has one or not.  So a new one is generated for every new record.  But it is not accepting this?

     

     z.PNG

  • BusyIntelligence Profile Picture
    321 on at

    That should work @Humanity 
    It's just a label isn't it? Is there an errormessage?
    You might try to put GUID() in Text() to forecome fieldtype issues, so Text(GUID()) instead of just GUID()

  • Humanity Profile Picture
    278 on at

    @Maurits 

     

    It says invalid argument type.

  • Humanity Profile Picture
    278 on at

    That is a text input.

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 393 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 278 Most Valuable Professional

Last 30 days Overall leaderboard