WebSite X5Help Center

 
Trevor M.
Trevor M.
User

Database viewer field column names  en

Author: Trevor M.
Visited 1899, Followers 1, Shared 0  

Please can you advise why the column names in my database viwer are "field_1, field_2 ...." etc?

I am trying to make them the same as the field lables in my contact form.

The data in the database, which is populated from the Contact form is working correctly except the field names are wrong as sated above.

I thought it may be something to do with the Contact Form, Insert Field>Options >

<name> atrubute

or

Database Field Name

but this did not change the viewer column titles

Posted on the
7 ANSWERS - 1 USEFUL - 1 CORRECT
Andre E
Andre E
Moderator

They are automaticly made and it's best not to change them.

Why field 1 and 2, wel it could be any other name, but it's not customer or user changeable.

Why would you, nobody sees them and you can see from data what fields are.

Read more
Posted on the from Andre E
John S.
John S.
User

I think you could change the name in the database.

Try to create a new field in the table - via C-panel.

Then make a new field in the form and set the name for the field you just created.

It is also possible to create a new field that is a timestamp, and use this in the viewer. This field should of course not be included in the form - this has nothing to do with the name - it is just a suggestion, as it could sometimes be nice to know when the post was created.

Read more
Posted on the from John S.
Trevor M.
Trevor M.
User
Author

Thank you for your comments.

Yes John, you can create your own tables with sensible field names  via C Panel. I just don't understand why the designers of website X5 would think field 1, field 2 etc is ok. Why do they think no one will see them - why create a data viewer? Of course someone, the site visitor, will see them and it may not be obvious what the data is???? (See Andre's comment.)

Thanks anyway guys.

Read more
Posted on the from Trevor M.
John S.
John S.
User

Hello Trevor

It would have been good if users could also make the X5 create the table with the names you specified for the fields.

In fact, I thought this was possible already.

But maybe it is to avoid incorrect names for a field. Not all users know which names is allowed and which not.

But I also think it is OK as long as you can specify the names in the table, and then let the form use these names.

Maybe the designers have thought : If a user cannot find out how to crete a table with fields, then this user are maybe not able to give fields correct names.

As you can use C-panel, then you should have no problem, I think.

If you are working a lot with databases, then I could suggest you take a look at Appgini. https://bigprof.com/appgini/

With this tool, it is easy to create advanced databases, and create different views.

You can see an example here: http://eksempelsite.dk/side-4.html

Another example here : http://eksempelsite.dk/engdr/eng_firms_view.php

In the last example is created parent/child reletions in 2 levels.

Read more
Posted on the from John S.
Trevor M.
Trevor M.
User
Author

Well John, guess what? The items available under "option" which I mentioned in my initial enquiry DOES actually set the field names in the mysql database.

The option "database field name" in "options" does set the name of the database field as it's title implies. The reason it did not work when I used it before was because I didn't set the field name there when initially setting up the form before uploading. If you use this option before uploading it sets the field name in mysql. Obviously, once uploaded you can't interfere with the table via this option. Then your only option is to edit field names via CPanel with care and in careful conjunction with the aforementioned options > database field name so both use the same field names.

Generally, I find the Website X5 user manual very good but in this instance it is not quite getting the proper use of this function across. Clearly the software developers did a very good job as this makes the database functionality really useful. I had used your suggestion of editing the table in CPanel and then adding the field names in the above mentioned option section, which was a bit of a pain but it does work. Anyhow, problem solved Website X5 is fine it's the support that's not quite up to speed on this occation as clearly they believe it can't be done because "no one would want that facility" ????

Thanks for your help John, I appreciated your support.

Read more
Posted on the from Trevor M.
John S.
John S.
User

Hello Trevor

Good you had it to function.

I was then not quite wrong, when I remembered that it should be possible to create fields with defined names - I tried this long time ago, but now I thought that I remembered wrong.

If you should have the need for database where you can specify user-access on table and record level, then remember that there is tools for such things - I mentioned one of them.

The database viewer is good when it comes to showing a table, but you cannot set pre-selections or select on user - all can see all.

You can set the object up so you can edit records, but it is a very poor editor.

Read more
Posted on the from John S.
Trevor M.
Trevor M.
User
Author

Yes I saw you mentioned appgini - I use it as well. I have built an app with it for daughter's school for children with learning difficulties. The app stores all the schools data on a variety of subjects. Like all these apps though you need to know quite a lot of coding to actually get it all to look good.

Read more
Posted on the from Trevor M.