[SOLVED] Order of fieldgroups in view details

A place for users and developers of the Xataface to discuss and receive support.

[SOLVED] Order of fieldgroups in view details

Postby cbrunet » Fri Sep 25, 2009 3:24 pm

I regrouped some fields into fieldgroups. While they are displayed in the order specified by "order" in the edit form, the display order in detail view is different. How do I rearrange the terms in view details?
Last edited by cbrunet on Fri Oct 30, 2009 8:05 am, edited 1 time in total.
--
Charles Brunet
http://cbrunet.net
cbrunet
 
Posts: 13
Joined: Tue Aug 19, 2008 7:14 am
Location: Québec, Canada

Postby shannah » Sat Sep 26, 2009 7:58 am

If memory serves, the view tab should obey the order you specify as the "order" in the fieldgroups definitions. With a caveat. The view tab allows users to drag and drop reorder the sections however they like. If they have done this, their user preference will override the default.

Xataface also allows you to configure the sections in the view tab independent of the edit form... I'm going to have to refer to my notes to give you the exact syntax...
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Postby cbrunet » Fri Oct 16, 2009 5:03 pm

I have three fieldgroups:

Code: Select all
[fieldgroup:Client]
order = 1

[fieldgroup:Compagnie]
order = 2

[fieldgroup:Conjoint]
order = 3


I also have an order attribute for each field.

When editing details, everything is in the specified order.

When viewing details, the sections are in the order: Compagnie, Details, Client, Conjoint. I can reorder them using drag and drop, but navigating to the next record reset the order of the fieldgroups. If I change the fieldgroups definition to

Code: Select all
[fieldgroup:Client]
order = 2

[fieldgroup:Compagnie]
order = 3

[fieldgroup:Conjoint]
order = 4


then groups show up in the right order both in view and edit details. (In fact, I have one field, ID, that is hidden and doesn't belong to any fieldgroup).


Finally, in list view, columns aren't ordered according to the order attribute of the fields. How do I change the order of the columns in the list view?

Charles.
--
Charles Brunet
http://cbrunet.net
cbrunet
 
Posts: 13
Joined: Tue Aug 19, 2008 7:14 am
Location: Québec, Canada

Postby shannah » Mon Oct 19, 2009 4:25 pm

list view obeys the order attribute of the fields. It doesn't observe fieldgroups. E.g.

[fieldgroup:GroupA]
order=2

[fieldgroup:GroupB]
order=1

[a]
group=GroupA

[b]
group=GroupB


View tab/Edit tab order would be
GroupB
> b
GroupA
> a

List tab order
a, b

If we want b first in the list tab we would do something like:

[a]
group=GroupA
order=2

[b]
group=GroupB
order=1


-Steve
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Postby cbrunet » Fri Oct 30, 2009 8:04 am

Finally, I realized I forgot to put order directive in some fields. My fault. Thanks for your support.

Charles.
--
Charles Brunet
http://cbrunet.net
cbrunet
 
Posts: 13
Joined: Tue Aug 19, 2008 7:14 am
Location: Québec, Canada

Postby dbaron2 » Thu Dec 10, 2009 2:45 am

I am having the same issue described in this thread. Edit Record pages respect the fieldgroup order specified in the fields.ini file using "order = " commands while the View Record pages appear to show fieldgroups randomly.

Here is my fields.ini file:

__sql__ = "SELECT DISTINCT c.*, c.change_memo_id as change_memo_id_find, s.status_name, u.user_name as submitted_by_name, w.workflow_name, a.category_name, b.subcategory_name, o.country_name, IFNULL(r.region_name, '<blank>') as region_name, IFNULL(l.locality_name, '<blank>') as locality_name, d.domain_name, u2.user_name as last_updated_by_name, IFNULL(c.date_approved, '<blank>') as date_approved_formatted, u3.user_name as approved_by_name, p.priority, CONCAT(CONCAT(g.reference_name, ' | '), t.capture_date) as govt_reference_name_date FROM change_memos c LEFT JOIN statuses s ON c.status_id = s.status_id LEFT JOIN users u ON c.submitted_by_id = u.user_entry_id LEFT JOIN workflow w ON c.workflow_id = w.workflow_id LEFT JOIN categories a ON c.category_id = a.category_id LEFT JOIN subcategories b ON c.subcategory_id = b.subcategory_id LEFT JOIN countries o ON c.country_id = o.country_id LEFT JOIN regions r ON c.region_id = r.region_id LEFT JOIN localities l ON c.locality_id = l.locality_id LEFT JOIN domains d ON o.domain_id = d.domain_id LEFT JOIN users u2 ON c.last_updated_by = u2.user_entry_id LEFT JOIN users u3 ON c.approved_by = u3.user_entry_id LEFT JOIN priorities p ON c.priority_id = p.priority_id LEFT JOIN govt_ref_captures t ON c.govt_reference_id = t.capture_id LEFT JOIN govt_references g ON g.reference_id = t.reference_id"

[fieldgroup:details]
label="Details"
order = 1

[change_memo_id]
widget:label = "Locator#"
widget:type = static
order = 1

[change_memo_id_find]
widget:type = hidden
visibility:list = hidden
visibility:browse = hidden
order = 2

[short_description]
widget:label = "Title"
widget:atts:size=80
order = 3

[status_id]
widget:label = "Status"
widget:type = select
vocabulary = StatusName
order = 4

[status_name]
widget:label = "Status"
widget:type = hidden
visibility:list = hidden
visibility:browse = hidden
filter = 1
order = 5

[submitted_by_id]
widget:label = "CRS Name"
widget:type = select
vocabulary = SubmittedBy
visibility:list = hidden
order = 6

[submitted_by_name]
widget:label = "CRS Name"
widget:type = hidden
visibility:list = hidden
visibility:browse = hidden
filter = 1
order = 7

[priority_id]
widget:label = "Priority"
widget:type = select
vocabulary = Priority
order = 8

[priority]
widget:label = "Priority"
widget:type = hidden
visibility:list = hidden
visibility:browse = hidden
order = 9

[workflow_id]
widget:label = "Workflow"
widget:type = select
vocabulary = WorkflowName
visibility:list = hidden
order = 10

[workflow_name]
widget:label = "Workflow"
widget:type = hidden
visibility:list = hidden
visibility:browse = hidden
order = 11

[repeat_reminder]
widget:label = "Repeat Reminder"
widget:type = select
vocabulary = Reminder
visibility:list = hidden
order = 12

[duplicate_record]
transient=1
widget:type = checkbox
widget:label = "Duplicate This Record"
order = 13

[last_steps]
widget:label = "Last Workflow Steps"
widget:type = hidden
visibility:list = hidden
visibility:browse = hidden
order = 14

[last_updated]
widget:label = "Last Updated"
visibility:list = hidden
visibility:browse = hidden
order = 15

[last_updated_by]
widget:label = "Updated By"
visibility:list = hidden
visibility:browse = hidden
order = 16

[last_updated_by_name]
widget:label = "Updated By"
visibility:list = hidden
order = 17

[fieldgroup:dates]
label="Dates (yyyy-mm-dd)"
order = 2

[date_submitted]
widget:label = "Date Submitted"
visibility:list = hidden
group = dates
filter = 1
order = 18

[effective_date]
widget:label = "Effective Date"
group = dates
order = 19

[date_found]
widget:label = "Date Found"
group = dates
order = 20

[date_approved]
widget:label = "Date Approved"
group = dates
order = 21

[date_approved_formatted]
widget:label = "Date Approved"
group = dates
widget:type = hidden
visibility:list = hidden
visibility:browse = hidden
filter = 1
order = 22

[approved_by]
widget:label = "Approved By"
group = dates
visibility:list = hidden
visibility:browse = hidden
order = 23

[approved_by_name]
widget:label = "Approved By"
group = dates
visibility:list = hidden
order = 24

[last_reminded]
widget:type = hidden
visibility:list = hidden
visibility:browse = hidden
order = 25

[fieldgroup:categories]
label="Category/Subcategory"
order = 3

[category_id]
widget:label = "Category"
widget:type = select
vocabulary = Category
visibility:list = hidden
group = categories
order = 26

[category_name]
widget:label = "Category"
widget:type = hidden
visibility:list = hidden
visibility:browse = hidden
group = categories
filter = 1
order = 27

[subcategory_id]
widget:label = "Subcategory"
widget:type = select
vocabulary = Subcategory
visibility:list = hidden
group = categories
order = 28

[subcategory_name]
widget:label = "Subcategory"
widget:type = hidden
visibility:list = hidden
visibility:browse = hidden
group = categories
filter = 1
order = 29

[fieldgroup:location]
label="Location"
order = 4

[domain_name]
widget:label = "Domain"
widget:type = hidden
visibility:list = hidden
filter = 1
group = location
order = 30

[country_id]
widget:label = "Country"
widget:type = select
vocabulary = Country
visibility:list = hidden
group = location
order = 31

[country_name]
widget:label = "Country"
widget:type = hidden
visibility:list = hidden
visibility:browse = hidden
filter = 1
group = location
order = 32

[region_id]
widget:label = "Region/State/Prov"
widget:type = select
vocabulary = Region
visibility:list = hidden
group = location
order = 33

[region_name]
widget:label = "Region/State/Prov"
widget:type = hidden
visibility:list = hidden
visibility:browse = hidden
filter = 1
group = location
order = 34

[locality_id]
widget:label = "Locality"
widget:type = select
vocabulary = Locality
visibility:list = hidden
group = location
order = 35

[locality_name]
widget:label = "Locality"
widget:type = hidden
visibility:list = hidden
visibility:browse = hidden
filter = 1
group = location
order = 36

[fieldgroup:govt_reference]
label="Government Reference"
order = 5

[govt_reference_id]
widget:label = "Reference"
widget:type = select
vocabulary = GovtReference
visibility:list = hidden
group = govt_reference
order = 37

[govt_reference_attachment]
widget:label = "Attachment"
Type = container
widget:type = file
visibility:list = hidden
allowed_extensions = xls,xlsx,csv,doc,docx,txt,pdf,gif,jpg,jpeg,png
validators:maxfilesize = 15000000
validators:maxfilesize:message = "The file you are uploading is too big!"
group = govt_reference
order = 38

[fieldgroup:description]
label="Description"
order = 6

[long_description]
widget:label = "Description"
visibility:list = hidden
group = description
order = 39

[test_description]
widget:label = "Test Description"
visibility:list = hidden
group = description
order = 40

[formatted_data]
widget:label = "Formatted Data"
Type = container
widget:type = file
allowed_extensions = xls,xlsx,csv,doc,docx,txt,pdf,gif,jpg,jpeg,png
validators:maxfilesize = 15000000
validators:maxfilesize:message = "The file you are uploading is too big!"
visibility:list = hidden
group = description
order = 41

[notes]
widget:label = "Notes"
visibility:list = hidden
group = description
order = 42

[fieldgroup:development]
label="ERP Business Analyst"
order = 7

[jdedwards_applicable]
widget:label = "JD Edwards"
widget:type = select
vocabulary = Applicable
visibility:list = hidden
group = development
order = 43

[jdedwards_devtrack_url]
widget:label = "DevTrack Link"
widget:atts:size=80
visibility:list = hidden
group = development
order = 44

[peoplesoft_applicable]
widget:label = "PeopleSoft"
widget:type = select
vocabulary = Applicable
visibility:list = hidden
group = development
order = 45

[peoplesoft_devtrack_url]
widget:label = "DevTrack Link"
widget:atts:size=80
visibility:list = hidden
group = development
order = 46

[sap_applicable]
widget:label = "SAP"
widget:type = select
vocabulary = Applicable
visibility:list = hidden
group = development
order = 47

[sap_devtrack_url]
widget:label = "DevTrack Link"
widget:atts:size=80
visibility:list = hidden
group = development
order = 48

[siebel_applicable]
widget:label = "Siebel"
widget:type = select
vocabulary = Applicable
visibility:list = hidden
group = development
order = 49

[siebel_devtrack_url]
widget:label = "DevTrack Link"
widget:atts:size=80
visibility:list = hidden
group = development
order = 50

[govt_reference_name_date]
widget:type = hidden
visibility:list = hidden
visibility:browse = hidden
order = 51
[/quote]
dbaron2
 
Posts: 15
Joined: Wed Sep 30, 2009 10:27 pm

Postby shannah » Fri Dec 11, 2009 10:07 am

In the view tab, field groups are ordered differently than in the edit tab because there are more players (e.g. there can be custom sections, related record sections, etc...).

You can set the order of a field group in the view tab using the section:order attribute.

e.g.
Code: Select all
[myfieldgroup]
    order=10  ;; Sets the order of group in edit tab
    section:order=10 ;; Sets the order in the view tab
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Postby dbaron2 » Fri Dec 11, 2009 11:09 pm

Thank You! It works perfectly now.
dbaron2
 
Posts: 15
Joined: Wed Sep 30, 2009 10:27 pm


Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 8 guests

cron
Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved