Hi all, I followed Reza Dorrani's tutorial to add tagging to attachments. (16) Power Apps Attachment Control Tutorial | Multiple Attachment Controls | Tag SharePoint attachme...
It all works but I need to include a timestamp. I inserted Now() but it isn't showing in the display areas. Any ideas?
Solved! Go to Solution.
Hello @karenlacey
Please try this code
ClearCollect(
colAttachments,
Self.Attachments
);
UpdateIf(
colAttachments,
!(First(
Split(
DisplayName,
"-"
)
).Result in colAttachTags),
{
Name: drpAttachTag.Selected.Value & "-" & Text(Now(),"yyy-dd-mmm-hhmmss") & "-" & Name ,
DisplayName: drpAttachTag.Selected.Value & "-" & Text(Now(),"yyy-dd-mmm-hhmmss") & "-" & DisplayName
}
)
These are the codes I
Just in case you my answer helped you solve your problem, please mark/accept this as a SOLUTION. This helps community members if they experience a similar issue in the future. |
bistek.space @cha_bistek @BisTekSpace |
Hello @karenlacey Preview
Convert your "Now()" code to a string format.
Text(Now(),"ddmmmyyyhhmmss")
Final code should be something like
If( frmPropertyProposalForm.Mode = FormMode.View,
Filter(
colAttachments,
drpAttachTag.Selected.Value = "All"
|| StartsWith
( DisplayName,
drpAttachTag.Selected.Value & "-" & Text(Now(),"ddmmmyyyhhmmss")
)
), colAttachments )
Just in case you my answer helped you solve your problem, please mark/accept this as a SOLUTION. This helps community members if they experience a similar issue in the future. |
bistek.space @cha_bistek @BisTekSpace |
Hi, thank you for the response. I tried this but it hasn't added any timestamp. By adding that code it has also impacted the ability to filter by tag. Any other ideas?
Hello @karenlacey
Sorry, I had the wrong assumption with the first code. Please keep the previous code to make your filter work.
May I know
(1) Is the timestamp that you need the "time" when user clicks submit? or when a photo is being selected for upload?
(2) Where in your form would you like the timestamp displayed?
Can you please show me your OnAddFile Property? Something similar below
Just in case you my answer helped you solve your problem, please mark/accept this as a SOLUTION. This helps community members if they experience a similar issue in the future. |
bistek.space @cha_bistek @BisTekSpace |
Thank you for the quick response, ideally when the attachment is uploaded, I would like the timestamp to appear beside it, so have the tag, file name, timestamp in the attachments window
This is my code in the OnAddFile section
ClearCollect(
colAttachments,
Self.Attachments
);
UpdateIf(
colAttachments,
!(First(
Split(
DisplayName,
"-"
)
).Result in colAttachTags),
{
Name: drpAttachTag.Selected.Value & "-" & Name,
DisplayName: drpAttachTag.Selected.Value & "-" & DisplayName
}
)
Hello @karenlacey
Please try this code
ClearCollect(
colAttachments,
Self.Attachments
);
UpdateIf(
colAttachments,
!(First(
Split(
DisplayName,
"-"
)
).Result in colAttachTags),
{
Name: drpAttachTag.Selected.Value & "-" & Text(Now(),"yyy-dd-mmm-hhmmss") & "-" & Name ,
DisplayName: drpAttachTag.Selected.Value & "-" & Text(Now(),"yyy-dd-mmm-hhmmss") & "-" & DisplayName
}
)
These are the codes I
Just in case you my answer helped you solve your problem, please mark/accept this as a SOLUTION. This helps community members if they experience a similar issue in the future. |
bistek.space @cha_bistek @BisTekSpace |
Brilliant, this works perfectly. thank you so much for your help.
You're welcome. glad I could help.
Just in case you my answer helped you solve your problem, please mark/accept this as a SOLUTION. This helps community members if they experience a similar issue in the future. |
bistek.space @cha_bistek @BisTekSpace |
User | Count |
---|---|
258 | |
111 | |
95 | |
48 | |
41 |