Jump to content


Bugs in Displaying setRelation Field when Showing More Than One Field in v.2.6.10

2.6.10 setRelation bug enterprise

  • Please log in to reply
2 replies to this topic

#1 larasmith

larasmith

    Advanced Member

  • Members
  • PipPipPip
  • 166 posts
  • LocationPhilippines

Posted 09 January 2019 - 03:01 AM

Hello Sir Johnny!

 

Happy New Year! I just went back to programming and applied the version: 2.6.10. I have the following setRelation code:

$crud->setRelation('vdr_Course', 'set_course', '{course_Title} [{course_RefNo}]');

I noticed that the data displayed in the datagrid was the actual field and not the combined field just like the one displayed in the dropdown as I was trying to showing more than one field. Please refer to the image below:

set-Relation-display.png

 

Is this a bug? If so, I hope this gets fixed immediately. The users may get confused if this is not fixed.



#2 larasmith

larasmith

    Advanced Member

  • Members
  • PipPipPip
  • 166 posts
  • LocationPhilippines

Posted 12 January 2019 - 04:47 PM

Follow-up regarding this topic...

#3 NadimD

NadimD

    Newbie

  • Members
  • Pip
  • 7 posts

Posted 12 January 2019 - 09:44 PM

Hello larasmith,

 

I'm new here and can't answer for the staff, I'm not a pro, but I'm willing to help you.

 

You could try to follow what I did here in 2.6.11 :

=> https://www.groceryc...solution-found/

 

Your problem might not be the same, so non-related, but since it's about brackets and fields, I think why not, you can always go back!

Also, could you try removing the brackets, just to see what happens, like this :

$crud->setRelation('vdr_Course', 'set_course', '{course_Title} {course_RefNo}');

Try again and leave only {course_RefNo}

 

Does that affect the display ? Is yes, you can try to use a callback, but you have to have the related field identifiable in order to make a callback on it:

https://www.groceryc.../callbackColumn

 

Set a callback on your column, get both course_Title and course_RefNo in your callback. Use the example provided in the link !







0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users