Hello!
I have 2 Sharepoint Lists for my PowerApp: Projects & Users
Projects has fields ID, Assigned To (mult-select people picker)
Users has fields ID, UserRecord (single-select people picker), Specialty
Relevant Powerapps elements:
comboAssignedTo (combobox)
labelSpecialty (label)
Outcomes:
where I'm at:
I have the comboAssignedTo displaying the records i want with this as the items property:
With(
{
_prefiltered_users: Filter(
Users, ID > 0
)
},
Sort(
ForAll(
Ungroup(
_prefiltered_users,
UserRecord
),
UserRecord
),
DisplayName,
SortOrder.Ascending
)
)
but when I try to save the record, I get a patch error (no details, just "Network error when using Patch function: An error occurred on the server.")
**I've tried refreshing the data connection, same error
I've got this for the labelSpecialty label text property so far but it errors out:
Concat(comboAssignedTo.SelectedItems, Value & ", ")
do I need a 'For All' in here somewhere?
Thanks in advance!!
this works perfectly! thank you so much for the guidance!
@ImaKickUrAsh - my fault I misread your post for item 3. You're correct we can use ForAll here:
Concat(
ForAll(
comboAssignedTo.SelectedItems As _selections,
LookUp(
Users,
UserRecord.Email = _selections.Email,
Specialty
)
),
Value & ";"
)
Thanks for your response & for your awesome blog post that got me most of the way there 🙂
1. got it, thanks - the combobox is displaying the filtered user list now without checking for ID 🙂
2. apologies for the lack of clarity: I'm not trying to pull the DisplayName from the selected records in the combobox, I'm trying to get the Specialty field value from the Users table for each of the selected combobox items
example:
Users
ID | User | Specialty |
1 | [User Record 1: DisplayName: John] | Development |
2 | [User Record 2: DisplayName: Sarah] | Presentations |
3 | [User Record 3: DisplayName: Sundeep] | Documentation |
if combobox has John & Sundeep selected, label text should populate "Development; Documentation"
3.1. Yes on EditForm control
3.2. i republished with the items property update (no other changes to data cards) & it seems to be working now
3.3. yes multi-select = true
@ImaKickUrAsh - that code looks familiar 😉
1. Assuming your data source is SharePoint, there is no need to use a Filter function to check if a record exists. The reason a Filter was used on my blog was to allow users to optionally Filter the data source first. The below will suffice:
Sort(
ForAll(
Ungroup(
Users,
UserRecord
),
UserRecord
),
DisplayName,
SortOrder.Ascending
)
2. The Items property of the comboAssignedTo contains a Table of records. If you check my blog again you will see a section where I explain the columns returned in that People data type schema are:
Using "Value" is not going to work here, because that is not a column which exists in that table schema. With this understanding in mind, use:
Concat(comboAssignedTo.SelectedItems,DisplayName & ";")
3. Regarding the error message:
Blog post for reference for anyone else who reads this post:
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.