Hi
So I have a combobox with External User info and when a user select a record it is added to the collection with a ClearCollect.
My data card for FullName . Organization, Designation etc get updated with the selected records.
So when a user change any information in the data card, I want to update a label text to Update User. How do I use an Is(Match) between the value in the collection and the data card.
Solved! Go to Solution.
Check FullName exists in the collection
Hi @indhaa
If(DataCardValue73.Text in colExternalUser.FullName,"True","False")
Or
DataCardValue73.Text in colExternalUser.FullName
Hi @indhaa
I believe you want to update the "External User" SP list information.
Note:
Sample:
HI,
Thanks for the info.
I can use that. Currently what I want to do was give the user the option to save or add users. Sometimes there might be one time users so in those cases they might not want to add the user to the SP list.
So I can add the SubmitForm() or Patch (I think better in this case) on a pop up message. In the label text I can say Add user (if a new user) or Update user (If there is any change to user info). That's why I want to use IsMatch to determine the text and if to Patch a new record or update a record.
So want to use IsMatch on a collection or the SP list to determine if it is a change and update the details if required.
But I'm having issue in getting the code right for Collection.
I'm using this code for the collection
IsMatch(collection.FullName,DataCardValue73.Text)
or trying to use a Lookup field for the SP List and use IsMatch but no luck
Pls help
Hi @indhaa
Need to check the SP list to see whether the user exists or not by checking the full name.
Your Save function will be
With (
{
_ExistingUser: LookUp(
'External User',
FullName = FullNameDataCard.Text
)
},
Patch(
'External User',
If(
IsEmpty(_ExistingUser),
Defaults('External User'),
_ExistingUser
),
{
FullName: FullNameDataCard.Text,
Designation: DesignationDataCard.Text,
Organization: OrganizationDataCard.Text
}
)
)
Note: Add User button/icon Onselect will be
NewForm(EditFormName);Reset(ComboBox1)
Hi,
I want to know about the IsMatch code to use if for Collection or if to check from SP List.
I'm having issues with that. Hope you are online now
Check FullName exists in the collection
Hi @indhaa
If(DataCardValue73.Text in colExternalUser.FullName,"True","False")
Or
DataCardValue73.Text in colExternalUser.FullName
User | Count |
---|---|
119 | |
86 | |
84 | |
74 | |
69 |
User | Count |
---|---|
215 | |
179 | |
141 | |
109 | |
83 |