cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
lknudson
Level: Powered On

boolean patch to cds

I have what used to be an easy deal with SQL patch for boolean value on a selected Gallery record:

            Patch('[dbo].[Delivery]',ThisItem,{Active:true})

I transitioned table over to CDS in order to take advantage of the attachment capability.  I created a two-option field to handle the boolean (yes/no).

However, when I reworked the functions to use new CDS table, I cannot seem to get that boolean to work.  I have tried:

          Patch(Deliveries_1,ThisItem,{Active:true})

but it gives me an error: " Invalid argument type. Expecting a optionsetvalue, but of a different schema."

I have tried replacing true with yes, "yes", "true"

 

Can anyone please tell me what I'm missing to make this work?

 

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
lknudson
Level: Powered On

Re: boolean patch to cds

I found what I think I needed here, but it's not very straightforward.

 

https://www.youtube.com/watch?v=pj7AJy_UVIw by Daniel Christian

 

I am kind of frustrated when some very workable, SQL compliant data types (e.g., autonumber for indexes and simple boolean data types) have been swept away and replaced by more complicated and obscure elements in CDS.

 

1 REPLY 1
lknudson
Level: Powered On

Re: boolean patch to cds

I found what I think I needed here, but it's not very straightforward.

 

https://www.youtube.com/watch?v=pj7AJy_UVIw by Daniel Christian

 

I am kind of frustrated when some very workable, SQL compliant data types (e.g., autonumber for indexes and simple boolean data types) have been swept away and replaced by more complicated and obscure elements in CDS.