Showing results for 
Search instead for 
Did you mean: 
New Member

How create my Variable

I would like to create a Variable that will return for me the division the site is from for example site Aeroton is a  Bakery(Division)


I already have a variable called varBranch that returns the site this information is in an external table called mas.branch and it returns the site with no issues using this function below

varBranchCode = POPCode,





However I have created another variable called varCategory/varDivision but still returns as blank maybe my function is incorrect may you assist please as the division or category is also found in the same table.My Function is as below





varBranch = Division,POPCode



Resident Rockstar
Resident Rockstar

Hi @RodzMaz81 ,

Is this code added in your App on start ? Are you trying check the value after you added this code in App start ?

If so please run the Run on start as mentioned below to check the value of the variable. As in the Edit mode the app on start will only when you open the app after that if you add any code in the app start you have run app start explicitly. 





 Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

If this post was helpful or you need more help please consider giving Thumbs Up and Tag me in your reply I'll be happy to help. If this post helped you solve your issue please click Accept as solution and provide Thumbs Up. This will help others find it more readily.

Super User
Super User


I would double check the field names that you use in your call to LookUp.

For example, if you want to return the Division value from the first record from the [mas].[Branch] table where the POPCode value matches the value in varBranch, this is the syntax that you would use. Notice how you would pass Division as the third argument to LookUp .


           varBranch = POPCode,


I agree with @RodzMaz81 . Also check the variable type of varBranch.
If it's a record you can easily refer to varBranch.Division or varBranch.Category to get to other fields of that record.
That way you need less Lookup functions.

Helpful resources

PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (1,010)