Problems inserting tagify values in database

@Teodor
I’ve tried dozens of times resetting and refreshing each time, but when I try to run “New multi Reference” I can’t save because it gives an error
I do not know what to do

this my table news and table catergory

@Teodor
sorry if i insist, but i should fix this
After many attempts, creating the references between the two tables, when saving it always gives me an error.
However then I see that it still creates a further table with the relations and if I visualize the relative change with the editor, it seems to me that it can still be corrected
The problem is whether it will work correctly or will it cause me errors
You can tell me something?

Schermata 2022-04-09 alle 11.27.16

Maybe you just have a similar issue like here:

so you just need to switch to Advanced in database manager and select your relations from the dropdown if they are missing.

@Teodor
I tried with what is proposed by the movie, but it doesn’t work for me anyway.

@ Teodor
I’ve tried them all. I no longer know what to invent to be able to create a tagify multi-reference.
Maybe because the site I’m working on is NodeJS or Mac OS?
Or maybe because the mySql database was created in Ubuntu on Hetzner Cloud Server?

or perhaps …
Schermata 2022-04-09 alle 23.32.50

@Teodor
in fact I had some tables imported from another project configured myISAM
I then converted all the tables to InnoDB, but unfortunately the “multi references” problem remains

@Teodor i have same problem as @Marzio has. mine is more simpler, users, roles is table
users has roles(multi reference). I added insertUser action and inputs as stated in tagify exmaple that you did on docs(meetins and attendes). but insert action become success, user added to users table but roles has no user id value and role id value. its empty. no data.

please help , there is no errors.


@Teodor @George Please help us on this issue… i could not follow up my development…
i ll have to have more multi references in anothe future tables as well. i have to solve this users and roles related first. According to the documentation provided by @Teodor i followed, but not working. but everything looks same as @Teodor had in his documentation. moreover there is no errors, otherwise i can figureout some how… strange

Which database server and version do you use?

I don’t know if it can help, but I discovered that my problems in using Wappler’s multi references were due to the fact that the database tables were created with programs external to Wappler
I recreated the tables with the same characteristics using Wappler’s Database Manager and have no more problems.
I couldn’t figure out why, because apparently the tables looked identical

I used only wapplers database manager to create database and tables, nothing external

any updates for this issue? seems like latest update also not resolved this issue… tagify not working as expected, help support is not given, why we have tagify in wappler?

Tagify is actually working as expected, tested and confirmed this already, so there is nothing to be “fixed” here.
There must be something wrong in your set up - either the multi references you setup or with the tagify/insert.

@Teodor i have tried with recreating the tables and multi refecence in between them. got this error when inserting the users, actualy users table having the data but the id of the user and role id is not in roles multi reference table. i have posted the action code here also. please have a look.

here is the createUser action script in code.

   {
  "meta": {
    "options": {
      "linkedFile": "/views/admin/users.ejs",
      "linkedForm": "serverconnectUserCreateForm"
    },
    "$_POST": [
      {
        "type": "text",
        "fieldName": "first_name",
        "options": {
          "rules": {
            "core:required": {
              "param": "",
              "message": "First name is required."
            }
          }
        },
        "name": "first_name"
      },
      {
        "type": "text",
        "fieldName": "last_name",
        "options": {
          "rules": {
            "core:required": {
              "param": "",
              "message": "Last name is required."
            }
          }
        },
        "name": "last_name"
      },
      {
        "type": "text",
        "fieldName": "email",
        "options": {
          "rules": {
            "core:required": {
              "param": "",
              "message": "E-Mail is required."
            },
            "core:email": {
              "param": ""
            }
          }
        },
        "name": "email"
      },
      {
        "type": "text",
        "fieldName": "password",
        "options": {
          "rules": {
            "core:required": {
              "param": "",
              "message": "Password is required."
            },
            "core:minlength": {
              "param": "8"
            }
          }
        },
        "name": "password"
      },
      {
        "type": "text",
        "fieldName": "roles",
        "name": "roles"
      }
    ]
  },
  "exec": {
    "steps": {
      "name": "insertUser",
      "module": "dbupdater",
      "action": "insert",
      "options": {
        "connection": "monexdb",
        "sql": {
          "type": "insert",
          "values": [
            {
              "table": "users",
              "column": "first_name",
              "type": "text",
              "value": "{{$_POST.first_name}}"
            },
            {
              "table": "users",
              "column": "last_name",
              "type": "text",
              "value": "{{$_POST.last_name}}"
            },
            {
              "table": "users",
              "column": "email",
              "type": "text",
              "value": "{{$_POST.email}}"
            },
            {
              "table": "users",
              "column": "password",
              "type": "text",
              "value": "{{$_POST.password}}"
            }
          ],
          "table": "users",
          "returning": "id",
          "query": "INSERT INTO users\n(first_name, last_name, email, password) VALUES (:P1 /* {{$_POST.first_name}} */, :P2 /* {{$_POST.last_name}} */, :P3 /* {{$_POST.email}} */, :P4 /* {{$_POST.password}} */)",
          "params": [
            {
              "name": ":P1",
              "type": "expression",
              "value": "{{$_POST.first_name}}"
            },
            {
              "name": ":P2",
              "type": "expression",
              "value": "{{$_POST.last_name}}"
            },
            {
              "name": ":P3",
              "type": "expression",
              "value": "{{$_POST.email}}"
            },
            {
              "name": ":P4",
              "type": "expression",
              "value": "{{$_POST.password}}"
            }
          ],
          "sub": {
            "roles": {
              "type": "insert",
              "table": "user_roles",
              "key": "user_id",
              "values": [
                {
                  "table": "user_roles",
                  "column": "role_id",
                  "type": "number"
                }
              ],
              "value": "{{$_POST.roles}}"
            }
          }
        }
      },
      "meta": [
        {
          "name": "identity",
          "type": "text"
        },
        {
          "name": "affected",
          "type": "number"
        }
      ]
    }
  }
}

What error exactly?

what is this? isn’t this error?

.returning() is not supported by sqlite3 and will not have any effect.

its only happens when i submit the form to insert user. i thought its a error… :slight_smile:

but i have no idea what wrong i’m doing, i have looked at your steps in docs and did many time, no success till now. even i recreated the database as well no luck.

Maybe @patrick can check this.

@Teodor and @patrick @George

Finally… i found the issue, when using Tagify mode value as “Select” then sub tables are not updated with user_id and role_id. below screenshot shows, that not works.

But when i change the mode to “Default” it works :slight_smile: but i wanted to have Select, because in my case i want the user to have one role.

This works:

Please investicate on your end, wether it works for you when using Mode: Select.
if it works for you please do let me know. Thanks