Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

Unable to select beyond 2nd level within form 14 Mar 2018 22:47 #15509

  • vlemos
  • vlemos's Avatar Topic Author
  • Online
  • Elite Member
  • Elite Member
  • Posts: 295
  • Thank you received: 41
Hello Admin

Can you resolve this please? Cook is unable to select fields beyond the second level within a form. However, it can resolve the same field selection if it is placed in a filter combo. I am trying to get the name of the user but only get fields from the first linked table.

Thanks
V

Please Log in or Create an account to join the conversation.

Unable to select beyond 2nd level within form 16 Mar 2018 04:24 #15512

  • vlemos
  • vlemos's Avatar Topic Author
  • Online
  • Elite Member
  • Elite Member
  • Posts: 295
  • Thank you received: 41
Hello Admin

Not having alot of time to play with, I was able to resolve this issue quickly by adding ORM functionality to the addSelect routine (see below). I don't know if you would consider looking at whats possible in the near future, but would love to see this limitation resolved so decided to share my 10min approach.

Best regards
v

USAGE:
\components\com_xxx\fork\views\users\view.html.php
	case 'assigned_to':
	/* Ajax List : Users
	 * Called from: view:job, layout:job
	 */
		$model = $this->getModel();
		$model->addSelect(array(
				'userid.name'
		));
		$items = $model->getItems();

MODIFIED ROUTINE:
\administrator\components\com_xxx\fork\classes\model\list.php
	/**
	* Method to store a SELECT entry for the SQL query.
	*
	* @access	public
	* @param	string	$select	
	*
	* @return	void
	*/
	public function addSelect($select)
	{
		if (!is_array($select))
			$this->addQuery('select', $select);

		if (is_array($select))
			$this->orm->select(array(
					$select
			));
	}

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Time to create page: 0.078 seconds
  I still don't believe he can really be human to do all this ! From all of the forums that I've ever participated in this is certainly the one that most encapsulates the feeling of being truly open source where everyone's opinions and contributions can and will shape the development of the service! It's truly awesome! Hope you enjoy cooking and look forward to reading and contributing to any of the editorial work that you proposed too!! Thanks
Gez (audibleid - JED)

Get Started