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
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.
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 .
Set( varDivision, LookUp( '[mas].[Branch]', varBranch = POPCode, Division ) );
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.