I am using a low code app development program, whilst being good and helping make things slightly faster, it has quite a few limitations.
Simplified The app is essentially used to store jobs... there are different tables, one for suppliers, another for customers etc and they are linked to the main table via Foreign Keys.
When I chose the customer, for example, in the job table, it then replaces the customer name with a number which is the primary key (ID) fro the customer table...
I have tried using generated columns and adding a query like SELECT 'Name' from TableB where id = fk_TableA_TableB but it does not work, I have since found that it is not possible to query other tables via expressions.
The other issue I have is that I cannot create a view because the app requires a Primary key which the view does not offer
What I am looking for is...
So TableA looks like
| Name | fk_TableA_TableB |
|---|---|
| Job 1 | 2 |
| Job 2 | 1 |
TableB
| id | Name |
|---|---|
| 1 | Joe |
| 2 | John |
The Result I would linke to acheive is an extra row at the end of TableA which gives the value of TableB based on the foreign key
| Name | fk_TableA_TableB | TableB |
|---|---|---|
| Job 1 | 2 | John |
| Job 2 | 1 | Joe |
An expression does not seem to work...
Is there a way I can use javascript to achieve a similar outcome...
Onchange of cellA update CellB with Customer_Name from tableA where Foreign_Key = id
IS this achievable?