SQL Field - List View Data #15

Closed
opened 2016-07-17 17:59:00 +00:00 by paolavness · 4 comments
paolavness commented 2016-07-17 17:59:00 +00:00 (Migrated from github.com)

Hey there, this is a question, not high priority right now.

With my countries custom SQL field - in list view of the all contacts, the id of the country is displayed, rather than the name of the country. Can you please point me in the right direction here, to get the country displaying in the list view.

Thanks!
Paola

Hey there, this is a question, not high priority right now. With my countries custom SQL field - in list view of the all contacts, the id of the country is displayed, rather than the name of the country. Can you please point me in the right direction here, to get the country displaying in the list view. Thanks! Paola

Sure, take a closer look at the following tutorial, and let me know if you still have questions.

Sure, take a closer look at [the following tutorial](https://www.youtube.com/watch?v=VpzYbifqv0M&index=19&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE), and let me know if you still have questions.
paolavness commented 2016-07-17 19:18:10 +00:00 (Migrated from github.com)

Hey there, aha... So this was helpful. I used a 'SQL' field for countries because the 'Custom' feel, in the section Field Information lists 'view' and 'views' as mandatory.

view (mandatory) The single view name if the place this field is added.
views (mandatory) The list view name if the place this field is added.

On exploring the dropbox custom fields, they are not. So I changed the type for from SQL to Custom, adding in the sql and removed the view & views attributes, and vwala, it works!

I'm wondering if any of the other attributes listed as 'mandatory' in the custom field type are not mandatory?

thanks again for quick response Llewellyn!
Paola

Hey there, aha... So this was helpful. I used a 'SQL' field for countries because the 'Custom' feel, in the section **Field Information** lists 'view' and 'views' as mandatory. > view (mandatory) The single view name if the place this field is added. > views (mandatory) The list view name if the place this field is added. On exploring the dropbox custom fields, they are not. So I changed the type for from SQL to Custom, adding in the sql and removed the view & views attributes, and vwala, it works! I'm wondering if any of the other attributes listed as 'mandatory' in the custom field type are not mandatory? thanks again for quick response Llewellyn! Paola

Well if it is marked as mandatory in the description, sure then it will use the default if you leave it out.

Remember even if you pull data from another component, it still has a single-view called view (check url) and a list-view called views (check url) . It will also have a table and a component name. Well that is if it is build like the core components.

You can still use the SQL field type, have a look at this also: https://docs.joomla.org/SQL_form_field_type

Yet I recommend using the Custom fields instead, it just seems more stable.

Check URL means in the back end it you open that view then the name that equals to option= is the view name.

Well if it is marked as mandatory in the description, sure then it will use the default if you leave it out. Remember even if you pull data from another component, it still has a single-view called **view** (check url) and a list-view called **views** (check url) . It will also have a table and a component name. Well that is if it is build like the core components. You can still use the SQL field type, have a look at this also: https://docs.joomla.org/SQL_form_field_type Yet I recommend using the Custom fields instead, it just seems more stable. Check URL means in the back end it you open that view then the name that equals to `option=` is the view name.

Also note that many of the details is used when you add this custom field to display in the list view and be sortable and part of filtering of this admin-view's (list view). If you do not add the field to the list view you can leave out many of the mandatory values and it will still work. So I marked all as mandatory so to insure everything is in place when needed for the various tasks.

Also note that many of the details is used when you add this custom field to display in the list view and be sortable and part of filtering of this admin-view's (list view). If you do not add the field to the list view you can leave out many of the mandatory values and it will still work. So I marked all as mandatory so to insure everything is in place when needed for the various tasks.
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: joomla/Component-Builder#15
No description provided.