How can i join values seprated by "|" in leftjoin to obtain multiple value
How can i join values seprated by "|" in leftjoin to obtain multiple value
Currently i am storing mutiple values like "1|2|3".
{
label: "Additional Actions",
name: 'checkbox',
type: 'checkbox',
separator: "|",
options: [
{ label: 'Logs Requested', value: 1 },
{ label: 'Logs Retrieved', value: 2 },
{ label: 'VATC Log Reviewed', value: 3 },
{ label: 'VCU Log Reviewed', value: 4 },
{ label: 'Datalogger Log Reviewed', value: 5 }
]
},
Field::inst('AC.label'),
->leftJoin('ops_analysisCheckbox AC', 'AC.id', '=', 'OL.checkbox')
This only gives us the first value and not the other ones
This question has an accepted answers - jump to answer
Answers
Your
checkbox
column is stored as a string, such as1|2|3
- is that correct? Can you show me the JSON response from the server please as well as the full controller?Allan
Sorry for the late response but I figured out another way where instead of storign them as seprated by "|" i am seprating them using ",". I am calling the query directly in the serverside script for that field. Below is how I have done it