Hi girls & guys,
I have a basic "contacts" table (imported CSV).
I would like that the ID field (integer) to be hidden from the user in the DETAIL VIEW and that this ID field will be filled automatically when adding a new contact (not needed the user's input).
The way it is set now - ID field must be filled by the user when adding a new contact and I would like to avoid that...
Thank you in advance for any help!
Hide ID field in the detail view
Re: Hide ID field in the detail view
Whenever you create a new table in appGini and then create a first field named "id" AppGini will automatically turn that field into a primary key field with unique index and auto increment number.
If you just leave it as is and regenerate your application the value of id will be generated automatically on insert.
You don't have to change anything else.
If you don't want users to see the field, just check [x] hide field in detail view.
If you just leave it as is and regenerate your application the value of id will be generated automatically on insert.
You don't have to change anything else.
If you don't want users to see the field, just check [x] hide field in detail view.
Kind regards,
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
AppGini 24.10 Revision 1579 + all AppGini Helper tools
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
[code]...[/code]
blocks for better readabilityAppGini 24.10 Revision 1579 + all AppGini Helper tools
Re: Hide ID field in the detail view
@Jsetzer
Thank you very much for your feedback!
I have find-out just now that I have to check the box "Auto increment" within the ID options to achieve what I want - it is not set "ON" by default...
BUT - when I do that - the ID counting starts from zero (0) and not from the last ID number loaded from the CSV file (in my case is 1024...)
I guess I have a new question - if I generate a table (containing the ID field) imported from the CSV file - is there a way to set the "auto increment" option of the ID field from the last ordinal number loaded from the CSV file (in my case, the next ID number should be 1025)?
Best!
Thank you very much for your feedback!
I have find-out just now that I have to check the box "Auto increment" within the ID options to achieve what I want - it is not set "ON" by default...
BUT - when I do that - the ID counting starts from zero (0) and not from the last ID number loaded from the CSV file (in my case is 1024...)
I guess I have a new question - if I generate a table (containing the ID field) imported from the CSV file - is there a way to set the "auto increment" option of the ID field from the last ordinal number loaded from the CSV file (in my case, the next ID number should be 1025)?
Best!
Re: Hide ID field in the detail view
Hi,
which version are you using? If you add to a new table at the beginning the id field, AppGini will set Primaray Key, Auto Increment, Unsigned and Hide in table view automatically. No need to do anything (as Jan wrote above).
If you import your data in the squence you do not need to specify the id, so the database will assign the incremental value to the id. In your case if you import 124 record, the next will get id125.
if you already have records in your table and import new data with higher id's, the database will automatically adjust the id field to the highest id +1.
which version are you using? If you add to a new table at the beginning the id field, AppGini will set Primaray Key, Auto Increment, Unsigned and Hide in table view automatically. No need to do anything (as Jan wrote above).
If you import your data in the squence you do not need to specify the id, so the database will assign the incremental value to the id. In your case if you import 124 record, the next will get id125.
if you already have records in your table and import new data with higher id's, the database will automatically adjust the id field to the highest id +1.
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.
- baudwalker
- Veteran Member
- Posts: 188
- Joined: 2015-02-03 08:08
- Location: Bellingen NSW Australia
Re: Hide ID field in the detail view
From within Appgini select the ID field and check "Hide in detail view"
- Attachments
-
- ID feild.JPG (49.28 KiB) Viewed 1996 times
Re: Hide ID field in the detail view
Thank you very much for your feedback!
@ pböttcher
I'm using the latest PRO ver. 5.97, revision 1142
The process of importing the CSV file in my AppGini aplication was like this:
1 - I have the XLS file containing CONTACTS (Name, address, phone etc.) - the very firs column in that EXCEL table is called id and it has an integer value (1,2,3....);
2- I export this XLS to CSV (using a comma (,) as field separator;
3 - In the AppGini, I go to IMPORT > TABLE FROM CSV file;
3 - Upon importing - the AppGini does not automatically recognized the id record as the primary field, I have to do that manually;
(But it recognizes the data of all the fields correctly!)
Is there an option in AppGini where I can set the program to look for an id field when importing CSV?
@ baudwalker
I did that - and it has no desired effect...
So, the main problem is the auto-increment of the ID field, it should work like pböttcher wrote about...
Thank you in advance for any new suggestions!
@ pböttcher
I'm using the latest PRO ver. 5.97, revision 1142
The process of importing the CSV file in my AppGini aplication was like this:
1 - I have the XLS file containing CONTACTS (Name, address, phone etc.) - the very firs column in that EXCEL table is called id and it has an integer value (1,2,3....);
2- I export this XLS to CSV (using a comma (,) as field separator;
3 - In the AppGini, I go to IMPORT > TABLE FROM CSV file;
3 - Upon importing - the AppGini does not automatically recognized the id record as the primary field, I have to do that manually;
(But it recognizes the data of all the fields correctly!)
Is there an option in AppGini where I can set the program to look for an id field when importing CSV?
@ baudwalker
I did that - and it has no desired effect...
So, the main problem is the auto-increment of the ID field, it should work like pböttcher wrote about...
Thank you in advance for any new suggestions!
Re: Hide ID field in the detail view
Hi,
actually AppGini tries to recognize the fields. So if you CSV field contains the fieldnames as first line, it should work straight forward.
Did you check on the database side if the autoincrement is set for the ID field?
actually AppGini tries to recognize the fields. So if you CSV field contains the fieldnames as first line, it should work straight forward.
Did you check on the database side if the autoincrement is set for the ID field?
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.
Re: Hide ID field in the detail view
@ pböttcher
The CSV file has the first column (first field) named "id" - so the AG should recognize this field upon the import...
Since it was not the case - I have set the ID field manually - as suggested above (screen shot below) - and auto-increment of the ID field works as it should...
I have watched the tutorial videos - there is no reference that the ID field will be set-up automatically by the AG...if this is the case only in the newest versions, I really don't know why it's not working for me...
Anyways, thank you pböttcher and all of you for your help!
Cheers!
The CSV file has the first column (first field) named "id" - so the AG should recognize this field upon the import...
Since it was not the case - I have set the ID field manually - as suggested above (screen shot below) - and auto-increment of the ID field works as it should...
I have watched the tutorial videos - there is no reference that the ID field will be set-up automatically by the AG...if this is the case only in the newest versions, I really don't know why it's not working for me...
Anyways, thank you pböttcher and all of you for your help!
Cheers!