Page 1 of 1

Field type | AppGini 23.11

Posted: 2023-05-12 18:58
by Moh Youba
Hello
Any help please, what is the best practice to link tables. I have 2 tables.

TableOne
• Id
• Name
• Link2table2
TableTwo
• Id
• Name
• Link2table1
I want to link :
Link2table1 to Link2table2
What is the settings of links field, can I just choose “varchar” or is it necessary to set to another type and set to “unique”?
Thank you

Re: Field type | AppGini 23.11

Posted: 2023-05-12 19:18
by jsetzer
It depends on what you want to save.
  • id (primary key)?
  • URL (href)?
  • reference as a combination of tablename and primary key for example as string like "notes-122" or as json object?
There are many ways. In most of the mentioned options a varchar field with appropriate length should be fine.

What did you try so far and does it work?

Re: Field type | AppGini 23.11

Posted: 2023-05-13 10:10
by Moh Youba
Hello sir

Thank you for your comment. I am just creating simple link, just was curious to know if there are specific way to do.

All my best