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,
Solved! Go to Solution.
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
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.
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.
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.
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
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.
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.
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
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()}))
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.
User | Count |
---|---|
199 | |
71 | |
50 | |
43 | |
30 |
User | Count |
---|---|
259 | |
124 | |
90 | |
86 | |
85 |