web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Power Apps Attachment ...
Power Apps
Unanswered

Power Apps Attachment Control

(0) ShareShare
ReportReport
Posted on by 58

Hi all, I followed Reza Dorrani's tutorial to add tagging to attachments. (16) Power Apps Attachment Control Tutorial | Multiple Attachment Controls | Tag SharePoint attachments - YouTube 

 

It all works but I need to include a timestamp. I inserted Now() but it isn't showing in the display areas. Any ideas? 

 

If( frmPropertyProposalForm.Mode = FormMode.View,
Filter(
colAttachments,
drpAttachTag.Selected.Value = "All"
|| StartsWith
( DisplayName,
drpAttachTag.Selected.Value & "-" & Now()
)
), colAttachments )
 
attachment.png
 
Categories:
I have the same question (0)
  • cha_cha Profile Picture
    4,932 Moderator on at

    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 )

     

     

  • karenlacey Profile Picture
    58 on at

    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? 

     

    attachment1.png

     

    attachment2.png

  • cha_cha Profile Picture
    4,932 Moderator on at

    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

     

    cha_cha_0-1669208619108.png

     

  • karenlacey Profile Picture
    58 on at

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

     

     

  • Verified answer
    cha_cha Profile Picture
    4,932 Moderator on at

    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 

    cha_cha_0-1669209201772.png

     

  • karenlacey Profile Picture
    58 on at

    Brilliant, this works perfectly. thank you so much for your help. 

     

    attachmenttimestamp.png

  • cha_cha Profile Picture
    4,932 Moderator on at

    You're welcome. glad I could help.

  • shanellcopeland Profile Picture
    2 on at

    @karenlacey @cha_cha I have gone through these steps as well and was able to add the category to the attachments.  However, does anyone know a way to copy the attachments to another list with the attachment category selected copied as well.  Along with other fields from the list the attachments are from.  I also need each category and set of attachments to be listed as individual records tied by a custom ID number field.  I am not using a gallery, simply a form view.  What would you suggest?

     

    For example of what the child list (Attachments) should look like pulled from the parent list:

    shanellcopeland_0-1678741602415.png

     

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard