cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
venka91
Helper V
Helper V

Save Custom toggle button text value to SharePoint list

Dear All,

I am developing a canvas app for a hospital record. I have set some toggle button.

Example:

Surgery (Yes / No)

Eyes(Normal / Abnormal) 

When i click the slider on Toggle button, the text value must be save into SharePoint list (instead of On/Off, True/False)

 

How can i achieve this. Please help.

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
v-bofeng-msft
Community Support
Community Support

Hi @venka91 :

Could you tell me:

  • Do you want to update specific text to the SharePoint List based on the value of Toggle?
  • What is the target column?Is it a Single Line Of Text column?

If so, you only need to replace the uploaded value from 

ToggleName.Value

to

If(Togglename.Value,"Textl","Text2")

For example:

I assume that the original submit formula is

Patch(YourSPList,Default(YourSPList),{Title:"Title",Eyes:Toggle1.Value})

and now it should be

Patch(YourSPList,Default(YourSPList),{Title:"Title",Eyes:If(Toggle1.Value,"Normal","Abnormal")})

In addition,If you are using a Form control, just replace the Update property of the specified DataCard with 

If(Togglename.Value,"Textl","Text2")

Best Regards,

Bof

View solution in original post

2 REPLIES 2
v-bofeng-msft
Community Support
Community Support

Hi @venka91 :

Could you tell me:

  • Do you want to update specific text to the SharePoint List based on the value of Toggle?
  • What is the target column?Is it a Single Line Of Text column?

If so, you only need to replace the uploaded value from 

ToggleName.Value

to

If(Togglename.Value,"Textl","Text2")

For example:

I assume that the original submit formula is

Patch(YourSPList,Default(YourSPList),{Title:"Title",Eyes:Toggle1.Value})

and now it should be

Patch(YourSPList,Default(YourSPList),{Title:"Title",Eyes:If(Toggle1.Value,"Normal","Abnormal")})

In addition,If you are using a Form control, just replace the Update property of the specified DataCard with 

If(Togglename.Value,"Textl","Text2")

Best Regards,

Bof

View solution in original post

venka91
Helper V
Helper V

Thanks. This worked perfectly.

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Users online (1,331)