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 / True/False toggle to u...
Power Apps
Answered

True/False toggle to update sharepoint list with current date?

(0) ShareShare
ReportReport
Posted on by 72

Hello All,

 

Is it possible to have a toggle switch that once toggled to true updates the list item on sharepoint? If so how can this be accomplished?

 

Thanks for your help,

Categories:
  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @J0hn 

    You can go about it a few ways and I'm not entirely sure of your scenario.

    But, in general, you can put a formula on the OnCheck action of the toggle and then:

       UpdateIf(yourList, criteria, {someRecord})

     

    I hope this is helpful for you.

  • J0hn Profile Picture
    72 on at

    Thanks @RandyHayes Basically I have a powerapps form that is tied to a sharepoint list with simple yes/no toggles to answer questions. When the user toggles the switch to Yes i want to update the excel sheet with the current date that the toggle was toggles to Yes. The way I am think of it in my head would be If(sharepoint list, item=true then update the excel sheet table 1 , cell with today's date.

     

    I have also tried doing this in power automate but I can only update the row and now just the specific cell I have added a couple screenshots perhaps that will better show what I am trying to do. 

    Form with toggles.JPG
    Excel sheet..JPG
    List.JPG
  • Verified answer
    v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    Hi@J0hn,

    Based on the issue that you mentioned, do you want to update the 'Date Last Submit' corresponding to the Month every time the Toggle is switched to yes?

    Could you please share a bit more about the scenario?

    I have a test on my side, please take a try as below:

    Set the OnCheck property of each Toggle as below:

    If(
     DataCardValue6.Value = true,
     Patch(
     Table1,
     LookUp(
     Table1,
     Month = DataCardValue8.Text
     ),
     {Date: Now()}
     )
    )

    Note: DataCardValue6 represents the Toggle corresponding to the certain question column in your SP list.

    DataCardValue8 represents the TextInput corresponding to the Month column in your SP list.

    Hope it could help.

    Regards,

    Qi

  • Verified answer
    RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @J0hn 

    So it is an Excel file you want to update?  You originally mentioned that you had a SharePoint list that you wanted to update.  Can you clarify which you are doing?

    Your lists both show months on them.  I assume that is the relationship between the two is significant.

    You have the month shown on the top of your screen image.  That would be relevant.  How is that populate?  What is the Text property of that label?

     

    Essentially what you are looking for will be this, on the OnCheck action of your checkbox:

       UpdateIf(yourList,  Month=yourlabelformula , {NameofTheColumnToWrite: Now()})

     

    I would also recommend this in your OnUncheck:

      UpdateIf(yourList,  Month=yourlabelformula , {NameofTheColumnToWrite: Blank()})

     

    This will reset the Excel value if the person unchecks the toggle.

     

     

     

  • J0hn Profile Picture
    72 on at

    @v-qiaqi-msft 

    Hello Qi,

     

    Thank you for your help I think we are almost there but I am receiving an error that the record isnt there even though it ? I have taken a screenshot of the formula and the error below. 

     

    2.JPG
    1.JPG
  • v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    Hi@J0hn,

    Could you please check if you have connected the Excel table to your app?

    In my scenario, I connected both my SP list and my Excel table to my app.

    Based on the screenshot you provided, I think the key is the connection, please connect the Excel table to your app.

    Hope it helps.

    Regards,

    Qi

  • J0hn Profile Picture
    72 on at

    Thanks for your help in the end this is what my formula looked like:

     

    If(DataCardValue3.Value=true,Patch(Table1,LookUp(Table1,Month=DataCardValue2.Text),{'Mo. Defibrillator Inspect. Cpl.':Now()}))

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 342 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 271

#3
Mohsin Ali Profile Picture

Mohsin Ali 223

Last 30 days Overall leaderboard