Hello,
I have found some topics about using view in grocery crud but nothing answering my problem so maybe members here can help?
this is my setup
⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠
Posted 23 November 2017 - 16:14 PM
Hello,
I have found some topics about using view in grocery crud but nothing answering my problem so maybe members here can help?
this is my setup
Posted 23 November 2017 - 16:40 PM
Well.. if i am not mistakened, you have created a member table with ID as primary key
and the same ID you are using in mem2officeview
i dont really see a good reason to slit the table data unnecessarily .. but anyways, its your call.
Very 1 thing, GC dose not pick up the primary key as a column 2 be displayed. Hence, it will not pickup ID by itself.
If you want to show it, you need to exclusilvely set that in the columns listing.
Post that - i dont really see a good reason for you to have set the primiarykey for mem2officeview.. even without it - the relation will happen fine
Now - you want to display office_name and you selecting field OFFICE in the relation - how can it technically work.
Please refer to the document and work around - what you intending to do is - show office_name for ID and set the column title as OFFICE - that is done with display_as
Refering to the document will surely help you understand the system better and will be in good position to use the library much better.
Happy GCing :)