⚠ 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. ⚠

  •     

profile picture

Show name (not ID) on set_relation_n_n



dontako

dontako
  • profile picture
  • Member

Posted 12 December 2012 - 22:09 PM

Hello!!! my question is this.. do not know if it's a problem with the structure of my tables or programming.
I need to show [b]the name[/b] (not the ID) of a field that is located outside the relationship "n_n", is it possible?

With my knowledge of SQL could do, or with active record, but with grocery Crud, I'm having a little headache xD
Thanks ....

Attached Images:
A: This is how it looks, shows the ID, not the name ...
B: There you can see the code and the relationship. To show I have put "{id} - {name}" because if I put "{name}, {name}" I get an error that the field name is not found, and this is normal since I'm not including the name of that field in the relationship.
C: The structure of my tables ... what I want to accomplish is to show when creating or editing, the field name is enclosed in green, not the ID circled in red

Excuse my English, I hope you understand my question ..

Greetings and Thanks :)

dontako

dontako
  • profile picture
  • Member

Posted 13 December 2012 - 18:48 PM

Help :C

Pascal

Pascal
  • profile picture
  • Member

Posted 22 February 2013 - 21:48 PM

Hi, did you get any answer? I have the same problem


davidoster

davidoster
  • profile picture
  • Member

Posted 22 February 2013 - 22:08 PM

Try to use your own model,

http://www.grocerycrud.com/documentation/options_functions/set_model

Check the 2nd Step on this link!


larasmith

larasmith
  • profile picture
  • Member

Posted 12 August 2014 - 13:32 PM

Dear davidoster,

 

Can u please give example on how to use that 2nd Step on the link...

Thank you very much!  :)