OctoberCMS Columns.yaml VALUE FROM With Multiple Fields
I have created one plugin using Builder plugin in OctoberCMS and in which I have columns.yaml file.
In a field called
property_id, I have a field as VALUE FROM which is asking to add my table's field name hence I have added one called as
But I want to concat multiple fields there. Something like below.
CONCAT(street_number, ' ', address)
But this is not working. I have also tried with other ways but its still not working.
Can someone guide me how to accomplish this ?
Additionally, It will be great if these fields gets concat if their respective values exists in table.
This is how my columns.yaml file looks like.
columns: property_id: label: Property type: text searchable: true sortable: false relation: Property valueFrom: street_number start_datetime: label: 'Start Date Time' type: datetime searchable: true sortable: true end_datetime: label: 'End Date Time' type: datetime searchable: true sortable: true status: label: Status type: number searchable: true sortable: true select: 'CASE WHEN (status = ''1'' ) THEN ''Active'' ELSE ''Inactive'' END'
Since there is logic involved here you might just wanna use a custom column type as detailed here https://octobercms.com/docs/backend/lists#custom-column-types. I wouldn't wanna put too much logic inside the yaml file.
The OP has added some example code to show exactly what I mentioned above in his comment here.
- → "failed to open stream" error when executing "migrate:make"
- → October CMS Plugin Routes.php not registering
- → OctoberCMS Migrate Table
- → OctoberCMS Rain User plugin not working or redirecting
- → October CMS Custom Mail Layout
- → October CMS - How to correctly route
- → October CMS create a multi select Form field
- → October CMS - Conditionally Load a Different Page
- → How to disable assets combining on development in OctoberCMS
- → October CMS - Radio Button Ajax Click Twice in a Row Causes Content to disappear
- → OctoberCms component: How to display all ID(items) instead of sorting only one ID?
- → In OctoberCMS how do you find the hint path?
- → How to register middlewares in OctoberCMS plugin?