cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Using patch with boolean values - Expected type 'Boolean'. Found type 'Record'

Hi, 

 

I am using a patch function to update a Sharepoint List using a PowerApps form but I am getting an issue with my Yes/No columns (The Column Type is Yes/No in sharepoint Lists). I have put an if statement to try andn solve this but it is not working. 

 

 

 

ForAll(
 Split(DataCardValue2.Text, "," ),
 Patch(
   'Walkdown Requests_1',
   Defaults('Walkdown Requests_1'),
     {
     'DAC No.': ThisRecord.Result,
     'Scope of works complete?': If(DataCardValue22.SelectedText= "Yes", true, false) 
      }
 )
)

 

 

 

I get the error Expected type 'Boolean'. Found type 'Record' 

latricekong_0-1625542826425.png

 

 

Thank you. 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
WarrenBelz
Super User
Super User

Hi @Anonymous ,

This should work

ForAll(
   Split(DataCardValue2.Text, "," ) As aPatch,
   Patch(
      'Walkdown Requests_1',
      Defaults('Walkdown Requests_1'),
      {
        'DAC No.': aPatch.Result,
        'Scope of works complete?': DataCardValue22.Selected.Value= "Yes"
      }
   )
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

2 REPLIES 2
WarrenBelz
Super User
Super User

Hi @Anonymous ,

This should work

ForAll(
   Split(DataCardValue2.Text, "," ) As aPatch,
   Patch(
      'Walkdown Requests_1',
      Defaults('Walkdown Requests_1'),
      {
        'DAC No.': aPatch.Result,
        'Scope of works complete?': DataCardValue22.Selected.Value= "Yes"
      }
   )
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

Anonymous
Not applicable

Thank you so much

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Power Apps Community Call Jan. 2022 768x460.png

Power Apps Community Call

Please join us on Wednesday, January 19th, at 8a PDT. Come and learn from our amazing speakers!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

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