Column order and hiding XML etc

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

Column order and hiding XML etc

Postby m23k » Thu Nov 01, 2012 9:09 am

Hi

Sorry, I've looked around for a few days now hoping to find some answers to these 2 questions but have failed.

1) Can I reorder the order the columns are listed in? (Feel like I'm missing the obvious here?)

2) Can I hide the Export/View XML, CSV, etc buttons/links?

Thanks
m23k
 
Posts: 19
Joined: Sun Oct 28, 2012 10:53 am

Re: Column order and hiding XML etc

Postby shannah » Thu Nov 01, 2012 9:16 am

1. Yes. Use the "order" directive in the fields.ini file. e.g.
Code: Select all
[myfield]
    order=10

[myfield2]
   order=9.5

[myfirstfield]
   order=-1000



2. Yes. You can hide any actions. Just create an actions.ini file in your project, then find the actions you want to hide (usually by looking in the Xataface actions.ini file and finding the action. Then override the action in your actions.ini file and set the category to "".
e.g.
Code: Select all
[export_csv > export_csv]
    category=""


-Steve
--
Steve Hannah
@shannah78 (on twitter)
sjhannah.com blog
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Re: Column order and hiding XML etc

Postby m23k » Thu Nov 01, 2012 10:12 am

1) Duh. I was being stupid/blind/delete as appropriate! How does this work with relationship lists though as I have fields from 2 different tables? If I try this it just orders all the relationship table fields first, then the tables from the 2nd table, in the order in each's fields.ini. I can't get some of the fields from the 2nd table to appear first, then the fields from the 1st/relationship table, and then the rest of the fields from table 2?

Edit: realised what I have explained is confusing. So an example:

I am on computer record X. I click on the 'person' relationship tab to show the person <-> computer relationships, linked via the computer_usage table.

Table: person
Fields: pid, firstname, surname, location

Table: computer_usage
Fields: cu_id, from_date, to_date, pid, cid

I want the relationship list fields to appear in this order:
person.firstname, person.secondname, computer_usage.from_date, computer_usage.to_date, person.location

They currently show as:
computer_usage.from_date, computer_usage.to_date, person.firstname, person.secondname, person.location

In computer_usage's fields.ini I have usage_from_date as order=3 and usage_to_date as order=4
In person's fields.ini I have I have firstname order=1 and surname order=2

It is reading the fields.ini because if I swap the numbers around and those fields swap around next to each other, but overall they still show as 3,4,1,2.

I guess the relationship list view doesn't look at these orders, does it look any where else for order though?


2) Done, cheers!
m23k
 
Posts: 19
Joined: Sun Oct 28, 2012 10:53 am

Re: Column order and hiding XML etc

Postby m23k » Thu Nov 08, 2012 5:46 am

Any ideas please? :)
m23k
 
Posts: 19
Joined: Sun Oct 28, 2012 10:53 am

Re: Column order and hiding XML etc

Postby shannah » Thu Nov 08, 2012 9:04 am

It doesn't look like there is a way to intersperse the sorting of columns on relationships with multiple destination tables currently. If this is important, you may need to either sort the columns after the fact using javascript, or create a custom action.
--
Steve Hannah
@shannah78 (on twitter)
sjhannah.com blog
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm


Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 21 guests

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