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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Add Date stamp to Shar...
Power Apps
Answered

Add Date stamp to SharePoint list which also has an email in the same column

(0) ShareShare
ReportReport
Posted on by 11

Hi, 

 

 I am a new user, can someone please help me with this query.   I've tried number of different ways however cant seem to get the result I'm looking for.

I have an App, that users can a unbook a session from clicking a button, once cancelled I would like to record the users email, date and time of when they have cancelled.  

 

The patch below works and adds the email address to Sharepoint list 'session' 

Patch(
[@Sessions],
First(
Filter(
[@Sessions],
ID = ThisItem.ID
)
),
{'Cancelled Bookings': User().Email & ", " & ThisItem.'Cancelled Bookings'}
)

 

I would like to add the date and time alongside the email address in the same column on SharePoint.  what's the best approach to do this ? can I amend this patch to include the date and time ? The SharePoint  column setting is set-up as 'multiple line of text' do I need to change this ? 

 

Thanking you in advance.

Categories:
  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @Uddinf 

    SharePoint has a metadata field Modified that automatically saves the last date and time that the record was changed.  It also has a 'Modified By' field that records the DisplayName and email of the user who made the change 

    ThisItem.'Modified By'.Email

  • Uddinf Profile Picture
    11 on at

    Hi

    Thanks for getting back to me.  Its not exactly what I am looking for.  The App is used to book users on a training a course , it records the name of the user and the session they have booked for .  Now when users cancels a session via the App it removes the name from the booked column to the cancelled booking column for the session

     

    Uddinf_0-1673272905073.png

     

     

    The email has been moved from ‘Booked attendees’ to Cancelled Bookings’ , what I was planning to do is add a datestamp next to the user user name , so when the button ‘Unbook Session’ is clicked we also know the info when the user has unbooked.

     

    Uddinf_1-1673272905086.png

     

     

    I was trying to patch the date and time without any luck.

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @Uddinf 

    The OnSelect property of the Unbook button:

     

    With({timestamp: User().Email &", ",Now()},
     Patch([@Sessions], LookUp([@Sessions],ID = ThisItem.ID),{'Cancelled Bookings':timestamp})
    )

     

  • Uddinf Profile Picture
    11 on at

    hi , i have replaced my patch : 

    Patch(
    [@Sessions],
    First(
    Filter(
    [@Sessions],
    ID = ThisItem.ID
    )
    ),
    {'Cancelled Bookings': User().Email & ", " & ThisItem.'Cancelled Bookings'}
    ),

     

    with your one 

     

    ); With({timestamp: User().Email &", ",Now()},
    Patch([@Sessions], LookUp([@Sessions],ID = ThisItem.ID),{'Cancelled Bookings':timestamp})
    ),

     

    it seems to throw me an error .  Is there something im missing?  

  • Verified answer
    Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @Uddin

    There was a typo. 

    With({timestamp: User().Email & ", " & Now()},
    Patch([@Sessions], LookUp([@Sessions],ID = ThisItem.ID),{'Cancelled Bookings':timestamp})
    )

  • Uddinf Profile Picture
    11 on at

    That worked perfectly, thank you so much 😊

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 411 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 338

#3
WarrenBelz Profile Picture

WarrenBelz 256 Most Valuable Professional

Last 30 days Overall leaderboard