Skip to main content

Good Afternoon, 

 

I have one SQL View which returns 2 fields: PTUID, Value

I have a custom SQL Table which has 2 columns: ID (autonumber), PTUID

 

What I need to achieve is a check box list which lists ALL the Values from the View and whereby the checkbox is checked IF there is a corresponding row for that PTUID in the custom SQL Table. 

 

What would be the recommended approach? 

 

Thanks for any pointers/help. 

 

Andrew

Hi Ahodgson,

 

You can try the following:

 

1.  You can use the SQL Stored Procedure by combining the Table and View. Then, for column as identifier you need to flag it True/False when the data is matched. Once the script is done, then publish it as SMO. Use that SMO in the checkbox list and set the custom column(True/False) as Identifier.

 

Sample (Haven't tested):

SELECT *, (CASE WHEN b.PTUID IS NULL THEN FALSE ELSE TRUE END) AS xIdentifier
FROM vw_PTU a
LEFT JOIN tbl_PTU b ON a.PTUID = b.PTUID

 

2.  Im not much familiar with this but you may try using the SmartObject Association using this link as reference.

     https://help.k2.com/kb000192

 

Regards,

Peter Busto


Reply