cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ryanz3653
Regular Visitor

adding a timestamp, and authorized users to edit specific field in power app

Hi community, I am new to Power Apps and I would like to ask two questions,

I am working on a MS form - SharePoint list - power automate - power apps project, I have built their link already.

 

There is a 'Date request' input field in MS form, when it comes to sharepoint list, I would like to add another column for 'Date request timestamp', it is the timestamp when users completed the form.

There is a 'status' field only in sharepoint list, when new records comes from MS form, it is automatedly 'New', unless users change it in sharepoint or power apps from 'New' to 'Completed', and a date field will be required for users to fill in when that happens - 'Date completed', and I want a column to show the timestamp for that - 'Date completed timestamp'

 

Overall I will need two timestamp columns, 'Date request timestamp' and  'Date completed timestamp', what is the workaround?

 

Here is a simple excel screenshot for explanation

ryanz3653_5-1715985027222.png

 

----------------------------------------------------------------------------------------------------------------------------------------

 

Second question, as i have many columns in sharepoint and in power apps,  I want some users are only authorized to edit some specific columns. Logics explained as in screenshot below, it is a edit screen in power apps. Is there a way to do that?

ryanz3653_4-1715984469181.png

 

---------------------------------------------------------------------------------------------------------------------------------------------

I hope above are all making sense, thank you in advance for your solutions!

 

5 REPLIES 5
Robu1
Continued Contributor
Continued Contributor

Hi @ryanz3653 ,

 

Welcome to power apps. 

 

Let’s address your questions step by step:

  1. Adding Timestamps:

    • To create timestamp columns in your SharePoint list, follow these steps:
      1. Date Request Timestamp:
        • In your SharePoint list, add a new column (e.g., “DateRequestTimestamp”).
        • Set the default value of this column to Now() when a new item is created. This will automatically capture the current date and time when users complete the form.
      2. Date Completed Timestamp:
        • Similarly, add another column (e.g., “DateCompletedTimestamp”).
        • When the status changes from “New” to “Completed,” use Power Automate to update the “DateCompletedTimestamp” column with the current timestamp.
  2. Column-Level Permissions:

    • To restrict user access to specific columns, consider the following approach:
      1. Create Security Groups:
        • In your Office 365 environment, create security groups (e.g., “Supervisors” and “Administrators”).
        • Add users to these groups based on their roles.
      2. Set Column Permissions:
        • In Power Apps, go to the table that corresponds to your SharePoint list.
        • Under the table schema, select the relevant column (e.g., “Comments” or “Priority”).
        • Expand the advanced options and enable “Enable column security.”
        • Configure the permissions for each group:
          • For “Comments”:
            • Supervisors: Edit
            • Submitters and others: View
          • For “Priority”:
            • Administrators: Edit
            • Submitters and Supervisors: View

Remember to replace the placeholder names (“Supervisors,” “Administrators,” etc.) with actual group names and adjust the permissions according to your specific requirements. This way, you can control who can edit specific columns while keeping others read-only.

Feel free to ask if you need further assistance or clarification! 😊🚀

 


If this post helps, then Click on the Thumbs Up below and Accept it as the solution to help others.

Thanks,

Robu1.

Thank you for your reply @Robu1, I followed your instruction and created following calculated columns in sharepoint list:

for Date Request Timestamp, my formula is =TEXT(NOW(),"dd/mm/yyyy hh:mm")

for Date Completed Timestamp, my formula is =IF(Status="Reviewed",TEXT(NOW(),"dd/mm/yyyy hh:mm"))

 

but whenever I updated my records, whether its in sharepoint or power app (like changing status from New to Completed), the Date Request Timestamp get updated as well, and I do not wish that happen, I would like it to stay forever the moment that this record from MS form to sharepoint, is that a workaround? and could you be more specific about the power automate part please,

thank you in advance.

Robu1
Continued Contributor
Continued Contributor

Robu1_0-1716261864457.jpeg

 

 

I understand your concern.

 

Calculated columns in SharePoint don’t update dynamically; they only update when an item is created or edited. Unfortunately, using NOW() in your formula will cause the timestamp to update every time the item is modified, which isn’t ideal for your use case.

 

Here are a couple of workarounds you can consider:

  1. Scheduled Flow to Update Timestamps:

    • Create a scheduled Power Automate (formerly Flow) flow that runs daily.
    • This flow should update the “Date Request Timestamp” and “Date Completed Timestamp” columns for all items in your SharePoint list.
    • You can use the “Update item” action in Power Automate to set the timestamp values based on your conditions (e.g., if the status changes to “Completed”).
    • This way, the timestamps will remain static once set during the initial form submission.
  2. Separate Columns for Creation and Completion Dates:

    • Instead of using calculated columns, create separate columns for “Date Request” and “Date Completed.”
    • Use Power Automate to set the initial “Date Request” timestamp when a new item is created.
    • Similarly, set the “Date Completed” timestamp when the status changes to “Completed.”
    • This approach ensures that the timestamps remain fixed once captured.

Regarding the Power Automate part, here’s a more detailed explanation:

  • Power Automate Flow for Date Request Timestamp:

    1. Create a new flow in Power Automate.
    2. Set the trigger to be when a new item is created in your MS Form responses.
    3. Add an action to create a new item in your SharePoint list.
    4. In the “Date Request Timestamp” field, use the utcNow() function to capture the current timestamp.
    5. Save and test your flow.
  • Power Automate Flow for Date Completed Timestamp:

    1. Create another flow triggered when an item is modified in your SharePoint list.
    2. Add a condition to check if the status has changed to “Completed.”
    3. If true, update the corresponding item’s “Date Completed Timestamp” with the current timestamp using utcNow().
    4. Save and test this flow as well.

Remember to adjust the column names and conditions according to your specific setup. If you encounter any issues or need further assistance, feel free to ask! 😊


I’ve provided detailed instructions for both workarounds, emphasizing the use of Power Automate to manage the timestamps effectively. If you need further clarification or have additional questions, feel free to ask! 🌟

Thank you @Robu1, at least now I know that I should be working toward PowerAutomate not the sharepoint,

I have just been working on the details of PowerAutomate following the guide of your previous two solutions for Date Request Timestamp and Date Completed Timestamp, do you mean I need to create two seperate flows? because in real case I will have other timestamp column as well (eg: Timestamp requested, timestamp reviewed, timestamp shipped, timestamp completed)

For Date Request Timestamp I created PowerAutomate flow as following screenshot 1, and formula in step 3 for Date Request Timestamp column is the screenshot 2. It seems working as per the purpose but just one glitch, I am always getting the result that their timezone is 3 hrs earlier, even though I have set up the correct timezone in the formula (In Toronto eastern time in my area) 

ryanz3653_0-1716347308189.png

ryanz3653_1-1716347453960.png

As for the Date Completed Timestamp, could you please provide the flow and formula details? (like how I did for timestamp for date request)

I believe the trigger point is 'When an item or a file is modified', and what comes after that?

ryanz3653_3-1716352012495.png

Thank you again in advance

 

Robu1
Continued Contributor
Continued Contributor

 ok @ryanz3653 , Let’s address your questions step by step:

 

  1. Multiple Timestamp Columns: You can create multiple timestamp columns in the same flow. Each timestamp column will have its own flow action. For example, if you need “Timestamp Requested,” “Timestamp Reviewed,” “Timestamp Shipped,” and “Timestamp Completed,” you can set up separate actions for each of these columns within the same flow.

  2. Timezone Issue: The timezone issue you’re experiencing is likely due to the default behavior of Power Automate, which uses Coordinated Universal Time (UTC) by default. To adjust the timestamp to your local time zone (Eastern Time in Toronto), you can follow these steps:

    • In your existing flow, locate the “Compose” action where you’re using @utcnow().
    • After the “Compose” action, add a new action called “Convert time zone.”
    • In the “Convert time zone” action, set the input time to the output from the “Compose” action (your UTC timestamp).
    • Specify the source time zone as “UTC” and the target time zone as “Eastern Standard Time” (or “Eastern Daylight Time” if applicable).
    • The output from this action will be the timestamp adjusted to your local time zone.

    Here’s how you can set up the “Convert time zone” action: !Convert time zone action

  3. Date Completed Timestamp: To create the “Date Completed Timestamp,” follow these steps:

    • Add a new action after the “Convert time zone” action (or after the “Compose” action if you skip the timezone conversion).
    • Choose the “Update item” action and connect it to your SharePoint list.
    • In the “Update item” action, map the “Date Completed Timestamp” column to the output from the “Convert time zone” action (or directly from the “Compose” action if you skip the timezone conversion).
  4. Flow Trigger: You’re correct that the trigger point should be “When an item or a file is modified.” This ensures that the flow runs whenever any item in your SharePoint list is updated.

    Your flow should look something like this:

    1. Trigger: When an item or a file is modified.
    2. Compose: @utcnow()
    3. Convert time zone: Convert the UTC timestamp to Eastern Time.
    4. Update item: Map the “Date Completed Timestamp” column to the converted timestamp.

    Remember to save and activate your flow after making these changes.

Feel free to adjust the flow according to your specific requirements, adding more timestamp columns as needed. If you encounter any issues or need further assistance, don’t hesitate to ask! 😊

Helpful resources

Announcements

Copilot Cookbook Challenge | Win Tickets to the Power Platform Conference

We are excited to announce the "The Copilot Cookbook Community Challenge is a great way to showcase your creativity and connect with others. Plus, you could win tickets to the Power Platform Community Conference in Las Vegas in September 2024 as an amazing bonus.   Two ways to enter: 1. Copilot Studio: https://aka.ms/CS_Copilot_Cookbook_Challenge 2. Power Apps Copilot Cookbook Gallery: https://aka.ms/PA_Copilot_Cookbook_Challenge   There will be 5 chances to qualify for the final drawing: Early Bird Entries: March 1 - June 2Week 1: June 3 - June 9Week 2: June 10 - June 16Week 3: June 17 - June 23Week 4: June 24 - June 30     At the end of each week, we will draw 5 random names from every user who has posted a qualifying Copilot Studio template, sample or demo in the Copilot Studio Cookbook or a qualifying Power Apps Copilot sample or demo in the Power Apps Copilot Cookbook. Users who are not drawn in a given week will be added to the pool for the next week. Users can qualify more than once, but no more than once per week. Four winners will be drawn at random from the total qualifying entrants. If a winner declines, we will draw again at random for the next winner.  A user will only be able to win once. If they are drawn multiple times, another user will be drawn at random. Prizes:  One Pass to the Power Platform Conference in Las Vegas, Sep. 18-20, 2024 ($1800 value, does not include travel, lodging, or any other expenses) Winners are also eligible to do a 10-minute presentation of their demo or solution in a community solutions showcase at the event. To qualify for the drawing, templates, samples or demos must be related to Copilot Studio or a Copilot feature of Power Apps, Power Automate, or Power Pages, and must demonstrate or solve a complete unique and useful business or technical problem. Power Automate and Power Pagers posts should be added to the Power Apps Cookbook. Final determination of qualifying entries is at the sole discretion of Microsoft. Weekly updates and the Final random winners will be posted in the News & Announcements section in the communities on July 29th, 2024. Did you submit entries early?  Early Bird Entries March 1 - June 2:  If you posted something in the "early bird" time frame complete this form: https://aka.ms/Copilot_Challenge_EarlyBirds if you would like to be entered in the challenge.

May 2024 Community Newsletter

It's time for the May Community Newsletter, where we highlight the latest news, product releases, upcoming events, and the amazing work of our outstanding Community members.   If you're new to the Community, please make sure to follow the latest News & Announcements and check out the Community on LinkedIn as well! It's the best way to stay up-to-date with all the news from across Microsoft Power Platform and beyond.        COMMUNITY HIGHLIGHTS Check out the most active community members of the last month! These hardworking members are posting regularly, answering questions, kudos, and providing top solutions in their communities. We are so thankful for each of you--keep up the great work! If you hope to see your name here next month, follow these awesome community members to see what they do!   Power AppsPower AutomateCopilot StudioPower PagesWarrenBelzcreativeopinionExpiscornovusFubarAmikNived_NambiarPstork1OliverRodriguesmmbr1606ManishSolankiMattJimisonragavanrajantimlSudeepGhatakNZrenatoromaoLucas001iAm_ManCatAlexEncodianfernandosilvaOOlashynJmanriqueriosChriddle  BCBuizerExpiscornovus  a33ikBCBuizer  SebSDavid_MA  dpoggermannPstork1     LATEST NEWS   We saw a whole host of amazing announcements at this year's #MSBuild, so we thought we'd share with you a bite sized breakdown of the big news via blogs from Charles Lamanna, Sangya Singh, Ryan Cunningham, Kim Manis, Nirav Shah, Omar Aftab, and ✊🏾Justin Graham :   New ways of development with copilots and Microsoft Power PlatformRevolutionize the way you work with Automation and AIPower Apps is making it easier for developers to build with Microsoft Copilot and each otherCopilot in Microsoft Fabric is now generally available in Power BIUnlock new levels of productivity with Microsoft Dataverse and Microsoft Copilot StudioMicrosoft Copilot Studio: Building copilots with agent capabilitiesMicrosoft Power Pages is bringing the new standard in secure, AI-powered capabilities   If you'd like to relive some of the highlights from Microsoft Build 2024, click the image below to watch a great selection of on-demand Keynotes and sessions!         WorkLab Podcast with Charles Lamanna   Check out the latest episode of the WorkLab podcast with CVP of Business Apps and Platforms at Microsoft, Charles Lamanna, as he explains the ever-expanding evolution of Copilot, and how AI is offering new opportunities for business leaders. Grab yourself a coffee and click the image below to take a listen.       Event Recap: European Collaboration and Cloud Summits 2024   Click the image below to read a great recap by Mark Kashman about the recent European Collaboration Summit and European Cloud Summit held in Germany during May 2024. Great work everybody!       UPCOMING EVENTS European Power Platform Conference - SOLD OUT! Congrats to everyone who managed to grab a ticket for the now SOLD OUT European Power Platform Conference, which takes place in beautiful Brussels, Belgium, on 11-13th June. With a great keynote planned from Ryan Cunningham and Sangya Singh, plus expert sessions from the likes of Aaron Rendell, Amira Beldjilali, Andrew Bibby, Angeliki Patsiavou, Ben den Blanken, Cathrine Bruvold, Charles Sexton, Chloé Moreau, Chris Huntingford, Claire Edgson, Damien Bird, Emma-Claire Shaw, Gilles Pommier, Guro Faller, Henry Jammes, Hugo Bernier, Ilya Fainberg, Karen Maes, Lindsay Shelton, Mats Necker, Negar Shahbaz, Nick Doelman, Paulien Buskens, Sara Lagerquist, Tricia Sinclair, Ulrikke Akerbæk, and many more, it looks like the E in #EPPC24 stands for Epic!   Click the image below for a full run down of the exciting sessions planned, and remember, you'll need to move quickly for tickets to next year's event!       AI Community Conference - New York - Friday 21st June Check out the AI Community Conference, which takes place at the Microsoft Corporate building on Friday 21st June at 11 Times Square in New York City. Here, you'll have the opportunity to explore the latest trends and breakthroughs in AI technology alongside fellow enthusiasts and experts, with speakers on the day including Arik Kalininsky, Sherry Xu, Xinran Ma, Jared Matfess, Mihail Mateev, Andrei Khaidarov, Ruven Gotz, Nick Brattoli, Amit Vasu, and more. So, whether you're a seasoned professional or just beginning your journey into AI, click the image below to find out more about this exciting NYC event.       TechCon365 & Power Platform Conference - D.C. - August 12-16th ** EARLY BIRD TICKETS END MAY 31ST! ** Today's the perfect time to grab those early bird tickets for the D.C. TechCon365 & PWRCON Conference at the Walter E Washington Center on August 12-16th! Featuring the likes of Tamara Bredemus, Sunny Eltepu, Lindsay Shelton, Brian Alderman, Daniel Glenn, Julie Turner, Jim Novak, Laura Rogers, Microsoft MVP, John White, Jason Himmelstein, Luc Labelle, Emily Mancini, MVP, UXMC, Fabian Williams, Emma Wiehe, Amarender Peddamalku, and many more, this is the perfect event for those that want to gain invaluable insights from industry experts. Click the image below to grab your tickets today!         Power Platform Community Conference - Sept. 18-20th 2024 Check out some of the sessions already planned for the Power Platform Community Conference in Las Vegas this September. Holding all the aces we have Kristine Kolodziejski, Lisa Crosbie, Daniel Christian, Dian Taylor, Scott Durow🌈, David Yack, Michael O. and Aiden Kaskela, who will be joining the #MicrosoftCommunity for a series of high-stakes sessions! Click the image below to find out more as we go ALL-IN at #PPCC24!       For more events, click the image below to visit the Community Days website.                                            

Celebrating the May Super User of the Month: Laurens Martens

  @LaurensM  is an exceptional contributor to the Power Platform Community. Super Users like Laurens inspire others through their example, encouragement, and active participation. We are excited to celebrated Laurens as our Super User of the Month for May 2024.   Consistent Engagement:  He consistently engages with the community by answering forum questions, sharing insights, and providing solutions. Laurens dedication helps other users find answers and overcome challenges.   Community Expertise: As a Super User, Laurens plays a crucial role in maintaining a knowledge sharing environment. Always ensuring a positive experience for everyone.   Leadership: He shares valuable insights on community growth, engagement, and future trends. Their contributions help shape the Power Platform Community.   Congratulations, Laurens Martens, for your outstanding work! Keep inspiring others and making a difference in the community!   Keep up the fantastic work!        

Check out the Copilot Studio Cookbook today!

We are excited to announce our new Copilot Cookbook Gallery in the Copilot Studio Community. We can't wait for you to share your expertise and your experience!    Join us for an amazing opportunity where you'll be one of the first to contribute to the Copilot Cookbook—your ultimate guide to mastering Microsoft Copilot. Whether you're seeking inspiration or grappling with a challenge while crafting apps, you probably already know that Copilot Cookbook is your reliable assistant, offering a wealth of tips and tricks at your fingertips--and we want you to add your expertise. What can you "cook" up?   Click this link to get started: https://aka.ms/CS_Copilot_Cookbook_Gallery   Don't miss out on this exclusive opportunity to be one of the first in the Community to share your app creation journey with Copilot. We'll be announcing a Cookbook Challenge very soon and want to make sure you one of the first "cooks" in the kitchen.   Don't miss your moment--start submitting in the Copilot Cookbook Gallery today!     Thank you,  Engagement Team

Announcing Power Apps Copilot Cookbook Gallery

We are excited to share that the all-new Copilot Cookbook Gallery for Power Apps is now available in the Power Apps Community, full of tips and tricks on how to best use Microsoft Copilot as you develop and create in Power Apps. The new Copilot Cookbook is your go-to resource when you need inspiration--or when you're stuck--and aren't sure how to best partner with Copilot while creating apps.   Whether you're looking for the best prompts or just want to know about responsible AI use, visit Copilot Cookbook for regular updates you can rely on--while also serving up some of your greatest tips and tricks for the Community. Check Out the new Copilot Cookbook for Power Apps today: Copilot Cookbook - Power Platform Community.  We can't wait to see what you "cook" up!      

Tuesday Tip | How to Report Spam in Our Community

It's time for another TUESDAY TIPS, your weekly connection with the most insightful tips and tricks that empower both newcomers and veterans in the Power Platform Community! Every Tuesday, we bring you a curated selection of the finest advice, distilled from the resources and tools in the Community. Whether you’re a seasoned member or just getting started, Tuesday Tips are the perfect compass guiding you across the dynamic landscape of the Power Platform Community.   As our community family expands each week, we revisit our essential tools, tips, and tricks to ensure you’re well-versed in the community’s pulse. Keep an eye on the News & Announcements for your weekly Tuesday Tips—you never know what you may learn!   Today's Tip: How to Report Spam in Our Community We strive to maintain a professional and helpful community, and part of that effort involves keeping our platform free of spam. If you encounter a post that you believe is spam, please follow these steps to report it: Locate the Post: Find the post in question within the community.Kebab Menu: Click on the "Kebab" menu | 3 Dots, on the top right of the post.Report Inappropriate Content: Select "Report Inappropriate Content" from the menu.Submit Report: Fill out any necessary details on the form and submit your report.   Our community team will review the report and take appropriate action to ensure our community remains a valuable resource for everyone.   Thank you for helping us keep the community clean and useful!

Top Solution Authors
Top Kudoed Authors
Users online (2,769)