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 / Set Global Variable to...
Power Apps
Answered

Set Global Variable to Specific Record

(0) ShareShare
ReportReport
Posted on by 175

App OnStart must be set to to make a variable out of a record from Sharepoint.

 

If the Variable is called HouseChoice, and you wanted the record with "Choose A House" in the Title column, what should Set() be like?

 

 

 

 

Categories:
  • eka24 Profile Picture
    20,925 on at

    Uset

    Set(HouseChoice,"Choose A House" )

    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

  • Sacred_Totems Profile Picture
    175 on at

    @eka24 

     

    Thanks eka... but I need the variable to be the entire record within 'House List', that has Choose A House as it's Title column.  If I were to put Set(HouseChoice,"Choose A House" ), then I would only have the words.

     

     

  • eka24 Profile Picture
    20,925 on at

    Please be more specific. If possible typical example will help

    Do you want something like:

    Set(HouseChoice,Filter('House list',ColumnName="Choose A House"))

    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

  • Sacred_Totems Profile Picture
    175 on at

    Global Variable = HouseChoice

    Data Source = House List

    Record to be make Global Variable from = The one with with "Choose A House" in the Title column field

     

    I need to make a global variable out of the entire House List record, using LookUp or something that will identify which record has Choose A House in the Title column.

  • eka24 Profile Picture
    20,925 on at

    Try

    Set(HouseChoice,Filter('House list',ColumnName="Choose A House"))

    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it

  • Sacred_Totems Profile Picture
    175 on at

    From first glance I am expecting that will return a table instead of record since it is using filter, which will be a problem later for me, since I am making reference to the variable's individual columns later on.

  • eka24 Profile Picture
    20,925 on at

    Show a sample Table and indicate what you want to see in the variable

    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

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

    Hi @Sacred_Totems 

    It would be the Lookup function that you would use in this instance:

    Set(HouseChoice,
     LookUp('House list',Title="Choose A House")
    )
    
    
  • Sacred_Totems Profile Picture
    175 on at

    I want the variable to be the entire record from Sharepoint, as a record, so I can draw from it throughout the app.  I'm purposely avoiding making the global variable a table though, so that formulas later are simpler.

     

    Example Sharepoint List:

    TitleColorSizeLocation
    Choose   
    HomeRed1234435 Blackberry Drive
    Rental PropertyBlue1100216 Pencil Street

     

    The list has dozens of columns for various parts the app.  Each row is called a "Record".  I had seen elsewhere in the forums that using the Filter function results in Tables being made instead of just Records.  That means formulas were more complicated when drawing on the columns in the record, since then you have to Filter the global variable table each time you use it, instead of automatically making reference to the specific record each time.

     

    I am expecting to use LookUp because it returns a single record only.  Where Filter is for generating a table of records. 

     

     

     

     

     

  • Verified answer
    v-siky-msft Profile Picture
    Microsoft Employee on at

    Hi @Sacred_Totems ,

     

    Filter returns a table, LookUp returns a record.

    Please try this:

    Set(HouseChoice,LookUp('SP list',Title="Choose A House"))

    Sik

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

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 260 Most Valuable Professional

Last 30 days Overall leaderboard