cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Advocate II
Advocate II

Set Global Variable to Specific Record

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?

 

 

 

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
Highlighted
Super User III
Super User III

Re: Set Global Variable to Specific Record

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")
)

View solution in original post

Highlighted
Community Support
Community Support

Re: Set Global Variable to Specific Record

Hi @Sacred_Totems ,

 

Filter returns a table, LookUp returns a record.

Please try this:

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

Sik

View solution in original post

11 REPLIES 11
Highlighted
Super User III
Super User III

Re: Set Global Variable to Specific Record

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.

Highlighted
Advocate II
Advocate II

Re: Set Global Variable to Specific Record

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

 

 

Highlighted
Super User III
Super User III

Re: Set Global Variable to Specific Record

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.

Highlighted
Advocate II
Advocate II

Re: Set Global Variable to Specific Record

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.

Highlighted
Super User III
Super User III

Re: Set Global Variable to Specific Record

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

Highlighted
Advocate II
Advocate II

Re: Set Global Variable to Specific Record

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.

Highlighted
Super User III
Super User III

Re: Set Global Variable to Specific Record

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.

Highlighted
Super User III
Super User III

Re: Set Global Variable to Specific Record

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")
)

View solution in original post

Highlighted
Advocate II
Advocate II

Re: Set Global Variable to Specific Record

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. 

 

 

 

 

 

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (6,452)