Lookup value incorrect when using View
-
Hi I put as a new post here.
Is it possible to lookup from “view” table ?
I have this one view that combine multiple table to easy access. But when lookup this table it confuse the form, some value are not shown and when added it select the wrong ID.This is the table
wp_users ( default wp table, change it to innodb )
customer , column : user_id (FK), customer_id (PK)
customer_contract , column : customer_id (FK), contract_id (PK), contract_info, etcThe relation is ( Foreign Key )
wp_users.ID = customer.user_id
customer.customer_id = customer_contract.customer_idThen I create a view for this three table which will shown
wp_users.ID
wp_users.display_name
customer.customer_id
customer_contract.contract_id
Note than since one user can have multiple contract, there will be duplicate ID. Does this cause the problem ?In the customer_contract table that generated by wp data access, I set it to lookup above view by their contract_id to find the display_name. But it get mess up, some user display_name were shown some not ( showing a different column value ).
Then when I add new contract to the customer, it save with the wrong customer_id
The topic ‘Lookup value incorrect when using View’ is closed to new replies.