cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper I
Helper I

Get bool value from SP list

Hello so im trying get bool value from my SP list, but im getting error (Invalid argument type (Table))

 

Can someone explain what im doing wrong?

 

Error:


attendtable.PNG

 

splist.PNG

Above is error and my SP list.

 

Thanks for all anwers.

2 ACCEPTED SOLUTIONS

Accepted Solutions
Highlighted
Dual Super User III
Dual Super User III

You are getting the text error because Attendance is defined as a single line of text column, not a Yes/No (boolean) column.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

Highlighted

You’ll want to use a Yes/No column. If you no longer have the option you might need to delete the column and re add.

View solution in original post

12 REPLIES 12
Highlighted
Super User III
Super User III

@Corbie 

 

Your toggle appears to be in a gallery.  In general you can use this code assuming the yes/no field in SP is called Attendance:

 

If(ThisItem.Attendance,true,false)

But to really understand the problem you'll need to share what property of the toggle you are changing.

 

---

Please click "Accept as Solution" if my response helped to solve your issue so that others may find it more quickly.  If your thought the post was helpful please give it a "Thumbs Up."

Highlighted
Dual Super User III
Dual Super User III

YOu don't want to test the datasource.Attendance.  You want to test ThisItem.Attendance.  If you do it for the data source you get a single column table of all the values for all the records in that field.  You want just the value for that particular record.  So your formula should read 

If(ThisItem.Attendance,


-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Highlighted

@mdevaney 

 

Yeah its in gallery, i wanna change property of OnSelect. i just wanna togle betweeen false and true and change them in SP List too.

I tried approach with OnCheck and UnCheck property but it didnt worked so i wanna try it with OnSelect property.

 

Thanks  @Pstork1 foe explanation,  but im getting error again this time with "text" instead of boolean.

 

gfdgfd.PNG

Highlighted

@Corbie 

If you want to change a value in Sharepoint this slider should be part of an Edit Form and you'd need to write a Submit function inside of the OnSelect property of the toogle.  If you don't submit the form the data does not get written to Sharepoint.

Highlighted
Dual Super User III
Dual Super User III

Can we see the List settings for the list?  I mocked this up with a Yes/No column and ThisItem.Column name comes through as a Boolean for me.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Highlighted

@mdevaney 

I followed tutorial from this guy:

https://www.youtube.com/watch?v=QLZzeQEgv4g

It worked for him, but im going to try it with edit form as you suggested, let you know if it is what im looking for.

 

Thanks for answers.

Highlighted

@Pstork1 

 

What do you need exactly? So much stuff in here 😄

listsettings.PNG

Highlighted
Dual Super User III
Dual Super User III

You are getting the text error because Attendance is defined as a single line of text column, not a Yes/No (boolean) column.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

Highlighted

@Pstork1 Oh i thought it will like convert it by it self.

 

Can you just navigate me where i can change it to yes/no column?

Because its imported from excel spreadsheet so if it is even possible?

 

Really thanks again,

 

Sorry for stupid questions but i started to learning powerapps yesterday

 

//EDIT:: I figured it out, thanks for all answers.

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (13,170)