Hi guys,
I am struggling with removing\adding\editing items in my Gallery. In SP list in one cell I have set of user skills separated by "," . To achieve nicely looking gallery I used Split function in Item as per below code. To display all the items I used label and in Text field I have ThisItem.Result. Right now my I am trying to somehow remove, add and edit these items in my gallery. Is there anyway to get this done?
Split(
Left(
LookUp(
Users,
Email = User().Email
).Skills,
Len(
LookUp(
Users,
Email = User().Email
).Skills
) - 2
),
","
).Result
Gallery output:
Thank you in advance,
Qb00ne
Solved! Go to Solution.
Hi @Qb00ne ,
This is free-typed, so watch commas/brackets, but I think you need to do something like this.
UpdateContext({varUserMail:User().Email});
With(
{
wSkillList:
With(
{
wSkills:
LookUp(
Users,
Email = varUserMail
).Skills
},
Left(
wSkills,
Len(wSkills)-2
)
)
},
ClearCollect(
colSkills,
Split(
wSkillList,
", "
)
)
);
RemoveIf(
colSkills,
YourDeleteValueName=Result
);
Patch(
Users,
{Email:varUserMail},
{
Skills:
Concat(
colSkills,
Result & ", "
)
}
)
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Hi @Qb00ne ,
This is free-typed, so watch commas/brackets, but I think you need to do something like this.
UpdateContext({varUserMail:User().Email});
With(
{
wSkillList:
With(
{
wSkills:
LookUp(
Users,
Email = varUserMail
).Skills
},
Left(
wSkills,
Len(wSkills)-2
)
)
},
ClearCollect(
colSkills,
Split(
wSkillList,
", "
)
)
);
RemoveIf(
colSkills,
YourDeleteValueName=Result
);
Patch(
Users,
{Email:varUserMail},
{
Skills:
Concat(
colSkills,
Result & ", "
)
}
)
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Thanks @WarrenBelz!
I managed to adjust the gallery using your code. Now I have some other issues while using Patch, please see the screenshot below. I am an owner of the sharepoint and do not have any issues with writing things to all the lists.
Is there any workaround to write the collection to Skills column? Or any other workaround?
This PowerApps stuff is still new for me 🙂
Hi @Qb00ne ,
You have a compulsory field "Security_x0020_Role that is obviously blank. A bit strange on an existing record though.
You could solve this by removing the requirement for data to be present, but better to sort out why it is blank if you need it.
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
User | Count |
---|---|
208 | |
94 | |
84 | |
49 | |
40 |
User | Count |
---|---|
264 | |
104 | |
103 | |
61 | |
59 |