Hide fields in Relationship.ini

Archived from the Xataface Users forum.

rwzhao — Wed Feb 18, 2009 12:33 pm

Hello, Steve,

I have a relationships.ini where I use customs SQL which left join with another table. On the list, I can see the all of fileds out the two tables. And I follow the visibility:tableA.somefiled=hidden but the somefield is still shown in the list. I have tried two options in relationships.ini as below:

  1. [somerelations]

tableA.r_id=”$r_id”

tableA.code=tableB.code

visibility:tableB.description=hidden

  1. [somerelations]

__sql__ = “SELECT tableB.title, tableA.others from tableA where tableA.code=tableA.code and tableA.r_id=’$r_id’”

visibility:tableB.description=hidden

I still get all the fileds from both tableA and tableB.

Any suggestion?


shannah — Wed Feb 18, 2009 1:07 pm

Try just:

Code: Select all
visibility:description=hidden

rwzhao — Wed Feb 18, 2009 2:22 pm

Tried but still shown.


rwzhao — Wed Feb 18, 2009 2:25 pm

Steve,

It only work without tableB.


shannah — Wed Feb 18, 2009 2:30 pm

Isn’t that what I said in my previous reply? Did you get it working?


rwzhao — Wed Feb 18, 2009 2:40 pm

Steve,

It works. Thank you.

How about the order of these fields?


ichia99 — Sun Jan 09, 2011 8:35 pm

Hi! I’m having the same problem in trying to hide the tables fields listed in the relationship.ini from appearing in lower section of the find form.
Upon adding the relationships.ini. The related tables appears at the second section of the find form.

In my case I’m trying to build a database for a car park season card which is assigned to a car park bay.

Below is my relationships.ini

[Card]
card.BayID = “$BayID”
bay.BayID = card.BayID
section:visible=0
visibility:description=hidden

The above configuaration did not hide the related tables.

Please advice.


ichia99 — Tue Jan 11, 2011 6:38 pm

Is this something that I’ve done wrong?
Can anyone with a solution to my problem please help?


shannah — Fri Jan 14, 2011 12:50 pm

I think you’re trying to do a slightly different thing. This thread was asking about hiding the field in a relationship list view. You’re trying to hide it from the find form.

I don’t recall if there is an easy way to do what you are trying to do right now. You could just hide the fields in question from all find forms by updating the fields.ini file visibility:find directive for the fields in question. A cheap way would be to use CSS or javascript to hide the sections in question (just look at the HTML source of the resulting find form to see what the CSS selector should be for your section… there should be a way to specify it).

-Steve