I have a ProjectList table which looks up the project user from a related table UserList.
I want the current user to click a button to select the first unassigned job from the ProjectList, and then populate the UserList lookup field with the current user
The new project selected and assigned to the current user must not already be assigned to anyone, so when the user requests a new project, it must be from a pool of candidates with a blank UserList field in the ProjectList table.
Here is the logic to grab the first unassigned project. In a separate patch statement I will assign it to the user.
Set(vProjectID,
First(
Filter(ProjectLists, IsBlank(UserList.User))
).PROJECT_ID
);
The issue is the delegation warning. I think it is because of checking a lookup field with isBlank().
How to work around that? UserList <> Blank() does not check for empty strings, isEmpty() checks a table.
update:
I thought using a view filtered for all blank users would solve the problem, but that comes with its own issues:
Set(vProjectID,
First(
Filter(ProjectLists,'ProjectLists (Views)'.UserView, !IsBlank(PROJECT_ID) )
).PROJECT_ID
);​
This expression picks the same PROJECT_ID each time the button is clicked, even though the PROJECT_ID it picks is no longer in the view.


Report
All responses (
Answers (