Hi everyone,
based on the video -> (https://www.youtube.com/watch?v=hJQjGE-oUpM&lc=UgzfMAk3ib0_Q-ykh4x4AaABAg.9cmRfLBzJlL9cmm_N2deXb) I'd like to add tags to my attachments based on two dropdown fields.
Thanks to the information contained in the video material - it was achieved - but there is a little problem ..
each time I add a new attachment, the tag is added to all attachments - including those previously added to the collection. This results in duplicate tags (as can be seen in the photo in the attachment). How to make adding a tag apply only to attachments that will be just added?
ClearCollect(colAttachments,Self.Attachments);
UpdateIf(colAttachments,
!(First(
Split(
DisplayName,
"-"
)
).Result in colAttachTags1),
{
Name: Dropdown1.Selected.Value & " - " & Dropdown1_1.Selected.Value & " - " & Name,
DisplayName: Dropdown1.Selected.Value & " - " & Dropdown1_1.Selected.Value & " - " & DisplayName
}
)
I would be grateful for help.
Michał Maciążek
Solved! Go to Solution.
Hi @MichalMaciazek ,
You have modified the formula to add spaces beside the dash symbols, which will make the Split function not work as expected. Please try and add spaces for the dash symbol in the Split function as well:
ClearCollect(colAttachments,Self.Attachments);
UpdateIf(colAttachments,
!(First(
Split(
DisplayName,
" - "
)
).Result in colAttachTags1),
{
Name: Dropdown1.Selected.Value & " - " & Dropdown1_1.Selected.Value & " - " & Name,
DisplayName: Dropdown1.Selected.Value & " - " & Dropdown1_1.Selected.Value & " - " & DisplayName
}
)
Best regards,
Community Support Team _ Jeffer Ni
If this post helps, then please consider Accept it as the solution to help the other members find it.
Hi @MichalMaciazek ,
You have modified the formula to add spaces beside the dash symbols, which will make the Split function not work as expected. Please try and add spaces for the dash symbol in the Split function as well:
ClearCollect(colAttachments,Self.Attachments);
UpdateIf(colAttachments,
!(First(
Split(
DisplayName,
" - "
)
).Result in colAttachTags1),
{
Name: Dropdown1.Selected.Value & " - " & Dropdown1_1.Selected.Value & " - " & Name,
DisplayName: Dropdown1.Selected.Value & " - " & Dropdown1_1.Selected.Value & " - " & DisplayName
}
)
Best regards,
Community Support Team _ Jeffer Ni
If this post helps, then please consider Accept it as the solution to help the other members find it.
Thank You! It helped :).
But unfortunately, now I have an error when I use Office365Outlook.SendEmailV2.
This problem occurs only if I add attachments.
This information about the problem appears:
This is how my function looks like :
Office365Outlook.SendEmailV2("XY;YZ","Audyt TPM - Wydział Cięcia - Zmiana " & zmiana.Selected.Value & " - " & Text(Now(),"dd-mm-yy"),HtmlText1.HtmlText,{Attachments:AddColumns(RenameColumns(DataCardValue8.Attachments,"Value","ContentBytes"),"@odata.types",""),Importance:"Normal"});
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
User | Count |
---|---|
203 | |
100 | |
61 | |
59 | |
57 |
User | Count |
---|---|
257 | |
162 | |
90 | |
79 | |
70 |