MYSQL View as Reference Table

Alex3
New Member

Hello,

New to Appsheet. I am trying to create an app that will display data from MYSQL tables and MYSQL views, and also allow for data entry. I created MYSQL views, specifically to allow the app users to select text values, as opposed to the foreign key ID numbers that are in the main database table.

I tried using the Appsheet โ€˜Refโ€™ column type in the main database table, but the app continues to display the foreign key ID instead of the corresponding name for the ID. The corresponding name is stored in the MYSQL view. I also tried applying the Appsheet โ€˜Refโ€™ column type to the Appsheet tables that were created using the MYSQL views, but that did not solve the problem either.

Any ideas?

Alex

0 6 205
  • UX
6 REPLIES 6

The corresponding name shall be the LABEL for that referenced table.

Many thanks

Should I place the Appsheet โ€˜Refโ€™ column type in the Appsheet table created from the main database table or should the Appsheet โ€˜Refโ€™ column type be created in the Appsheet table created from the MYSQL view?

On the MYSQL side, the main database table is the child to the table that is represented by the MYSQL view.

Alex

You need to do it on AppSheet column structure.

Hi Levent,

I really appreciate the help. To clarify, I have two Appsheet tables.

  1. One Appsheet table was created from the main database table (i.e. the table that new entries are being created in)

    For example:
    Cars

  2. And the other Appsheet table was created from the MYSQL view (i.e. the parent table that has the names).

    For example:
    Car Types

In which table should the โ€˜Refโ€™ column type be placed?

Also, are there any other Valid_if expressions or display settings that need to updated as well?

Thanks again,

Alex

Alex3
New Member

Hi Levent,

I was able to figure out how to dereference the MYSQL tables and MYSQL views in Appsheet.

Thanks,

Alex

Excellent.

Top Labels in this Space