cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MichalMaciazek
New Member

Problem with tagging items added as attachments

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

1 ACCEPTED SOLUTION

Accepted Solutions
v-jefferni
Community Support
Community Support

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.

View solution in original post

2 REPLIES 2
v-jefferni
Community Support
Community Support

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:

 

pa_error.JPG

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"});

Helpful resources

Announcements
Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Users online (1,253)