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 forum is read-only and soon will be archived. ⚠
Posted 23 November 2017 - 04: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 - 04: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
Support →
I have a question →
Call to undefined method App\Libraries\GroceryCrud::set_relation()Started by ajith1028, 07 Apr 2021 ![]() |
|
![]() |
||
Support →
Bugs / Issues →
Problem in ViewStarted by alvees_dan, 07 Jun 2020 ![]() |
|
![]() |
||
Support →
I have a question →
set relations between tables in different databases, same "domain", same databases passwordsStarted by fede72bari, 15 May 2020 ![]() |
|
![]() |
||
Support →
I have a question →
How to create a pdf from read viewStarted by Luiz_Techboard_BR, 17 Mar 2020 ![]() |
|
![]() |
||
Support →
Bugs / Issues →
fields with set_relation inserts empty when save button (not save and go back to list)Started by troyv, 08 Oct 2019 ![]() |
|
![]() |
0 members, 0 guests, 0 anonymous users