Hi
When creating a subform object, the foreign key disappears after saving.
When I look in the table zzzsys_object, the ID is entered.
If I add a new row to my subform, it also disappears upon saving.
Any idea what is going wrong?
Welcome to the nuBuilder Forums!
Register and log in to access exclusive forums and content available only to registered users.
Register and log in to access exclusive forums and content available only to registered users.
subform object - foreignkey
subform object - foreignkey
You do not have the required permissions to view the files attached to this post.
-
- nuBuilder Team
- Posts: 4428
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 74 times
- Been thanked: 475 times
- Contact:
Re: subform object - foreignkey
The foreign key field uses the following SQL query. Replace #sob_subform_table# with your actual table name, run it in phpMyAdmin, and check why it returns no rows.
Code: Select all
SELECT column_name, column_name
FROM information_schema.columns
WHERE table_name = '#sob_subform_table#'
AND table_schema = database()
AND COLUMN_KEY <> 'PRI'
You do not have the required permissions to view the files attached to this post.
Re: subform object - foreignkey
Kev1n
This is the error
SELECT column_name, column_name
FROM information_schema.columns
WHERE table_name = zzsys_bijlagen
AND table_schema = database()
AND COLUMN_KEY <> 'PRI' LIMIT 0, 25
MySQL meldt: Documentatie
#1054 - Onbekende kolom 'zzsys_bijlagen' in WHERE
Johan
This is the error
SELECT column_name, column_name
FROM information_schema.columns
WHERE table_name = zzsys_bijlagen
AND table_schema = database()
AND COLUMN_KEY <> 'PRI' LIMIT 0, 25
MySQL meldt: Documentatie
#1054 - Onbekende kolom 'zzsys_bijlagen' in WHERE
Johan
-
- nuBuilder Team
- Posts: 4428
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 74 times
- Been thanked: 475 times
- Contact:
-
- nuBuilder Team
- Posts: 4428
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 74 times
- Been thanked: 475 times
- Contact:
Re: subform object - foreignkey
ChatGPT says:
This query might return no rows because:
No matching columns: The table zzsys_bijlagen might exist, but all its columns are either primary keys (COLUMN_KEY = 'PRI') or have a NULL/empty COLUMN_KEY.
Wrong database: database() may not match the schema where zzsys_bijlagen exists.
Case sensitivity: The table name 'zzsys_bijlagen' may not match the actual case-sensitive name in information_schema.columns, depending on the database's collation and OS.
Non-existent table: The table might not exist at all in the current schema.
This query might return no rows because:
No matching columns: The table zzsys_bijlagen might exist, but all its columns are either primary keys (COLUMN_KEY = 'PRI') or have a NULL/empty COLUMN_KEY.
Wrong database: database() may not match the schema where zzsys_bijlagen exists.
Case sensitivity: The table name 'zzsys_bijlagen' may not match the actual case-sensitive name in information_schema.columns, depending on the database's collation and OS.
Non-existent table: The table might not exist at all in the current schema.
Re: subform object - foreignkey
Kev1n
Not so clever but of course I had to replace database() with the name of my database as well.
After this all the fields are shown.
I also see this when I create the object. But once saved, this is not shown again.
Johan
Not so clever but of course I had to replace database() with the name of my database as well.
After this all the fields are shown.
I also see this when I create the object. But once saved, this is not shown again.
Johan
-
- nuBuilder Team
- Posts: 4428
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 74 times
- Been thanked: 475 times
- Contact:
Re: subform object - foreignkey
Would it be possible to upload a sample database with the relevant tables/forms? That way, I can check where the error is coming from.
Otherwise, it's quite difficult to identify the cause without seeing the database schema, etc.
It can also be a simplified or copied version—just a minimum reproducible example.
Otherwise, it's quite difficult to identify the cause without seeing the database schema, etc.
It can also be a simplified or copied version—just a minimum reproducible example.
Re: subform object - foreignkey
Kev1n
Thanks for your support.
Johan
Thanks for your support.
Johan
You do not have the required permissions to view the files attached to this post.
-
- nuBuilder Team
- Posts: 4428
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 74 times
- Been thanked: 475 times
- Contact:
Re: subform object - foreignkey
Could you also dump a sample form with the subform object on it? (Use the cloner)