Homepage of my app is basically a list of jobs from a Sharepoint list. On clicking on one of the items, the user is taken to a view with more info about the job, and I store details of which Job the user has selected using a global variable, i.e,
onSelect = Set(Job, ThisItem);
where ‘ThisItem’ is the list record.
The subsequent view also contains a form to update a different list (including a column referencing the ID of the ‘Job’ variable). On submission of this form, the Job list and the Job global variable is updated:
OnSuccess =
Patch(
Jobs_1,
LookUp(
Jobs_1,
ID = Job.ID
),
{
'Task stage': {Value: "Name of the first stage"},
'Task Number': 2
}
);
Set(
Job,
Patch(
Job,
{
'Task stage': {Value: "Name of the second stage"},
'Task Number': 2
}
)
);
If the form is submitted, it goes to view mode, and displays the submission. I do this by referencing the current Job ID in the global variable ‘Job’, and setting the following to the form’s ‘Item’:
LookUp('Different List', JobID=Job.ID)
My issue is that the global variable “Job” doesn’t seem to be recognised in the LookUp, as it’s giving me an error “Invalid use of “.”” where I’ve written Job.ID. The word “Job” also doesn’t change colour to show it’s recognised as a global variable.
On the same view, I reference Job for making text labels without any issues; it’s just in this LookUp that it doesn’t work.
Additionally, this LookUp DOES work on another view.
I’ve checked to make sure I am always assigning “ID” as the same type (number).
Thanks for any help
cedar is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.