Hi all,
I have an issue that I have had trouble finding the answer to and hope you can help 😊
First let's get the initial details out of the way:
- It is a custom page that opens from a sub-grid
- This custom page will allow users to add multiple records to the sub-grid, by selecting them from a gallery
- The sub-grid record consists of a lookup to systemuser and some other datapoints that are not relevant
The current design goal is to display a gallery with all relevant sytemusers and then let the user pick from that list. The custom page will then create the records in the subgrid through a patch operation.
The problem we are facing is that we want to filter out the users that are a part of the current sub-grid records. For instance, if we have three relevant users and user1 has already been added as a lookup to the sub-grid record, then we want the custom page to only show user2 and user3.
Currently I am trying to make this happen in the OnStart property through collections:
Set(varCurrentRecord, Param("recordId"));
Set(varCurrentRecord, Replace(Replace(varCurrentRecord, 1, "", "{"), 1, "", "}")); Notify(varCurrentRecord);
Set(varCurrentRecord,"bf29b8b3-5ee5-eb11-bacb-0022489c01de");
ClearCollect(colSurveyInterviewers, Filter('Survey Interviewers', Survey.Survey = GUID(varCurrentRecord)));
ClearCollect(colUsers, Filter(Users, Not('Interviewer ID' = Blank())));
I have overwritten the varCurrentRecord with a static GUID for development purposes.
The first collection 'colSurveyInterviewers' is a collection of sub-grid records from 'varCurrentRecord'
The second collection 'colUsers' is all relevant users
Now I want to remove records from 'colUsers' based on the lookup field from 'colSurveyInterviewers'.
How would I achieve this? I have tried RemoveIf to no avail - here is some of my attempts.
RemoveIf(ColUsers, User in LookUp(colSurveyInt.Interviewer.Interviewer, colSurveyInt.Survey.Survey in Text(varCurrentRecord)).dst_SystemUser.User);
RemoveIf(ColUsers, User = LookUp(colSurveyInt.Interviewer.Interviewer, colSurveyInt.Survey.Survey = GUID(varCurrentRecord)).dst_SystemUser.User);
Thanks in advance

Report
All responses (
Answers (