Is it possible to order a list usigng raw value of a dbjoin element?

Keraunox

Member
Hello,

I'm using fabrik 3.3.3 and i would like to know if is there a way to order a list usigng the raw value and not the label of a dbjoin element that belong to that list.

thanks in advance
 
Ok, thank you for your reply

will this feature implemented in future versions of fabrik or is it something not trivial to achieve?

IMO could be sometimes usefull
 
It involves a fair amount of coding. The actual building of an order by query isn't the hard part, it's building the backend params to let you select the "raw" value. If you look at (say) the pre-filter options, where you select a field, for joins we give you two options - Foo, and Foo(raw). The Foo(raw) means you want the "value" rather than the "label". But there is a LOT of coding under the hood to do that.

So we could do that for the Order By, but it's a lot of work. And we have to focus our time on either a) things which the majority of users need / have asked for, or b) features we get paid to code. And this isn't something a lot of people ask for (you are the only one I an remember in the last year or so) ... which kinda leaves option b) ...

-- hugh
 
Old thread, but as I needed to order the list on the raw value of the joined data, here is the workaround I implemented

Suppose I have in the main table a field id_state that refers to a secondary table (id, state).
Now, I want the main table to be ordered by id_state instead of state as Fabrik does by default on joined tables.
  1. Create in the main table a hidden field id_stateraw
  2. Maintain on update with a php plugin after process UPDATE maintable SET id_stateraw = id_state
  3. Now, you can ask Fabrik to order the list by id_stateraw
And voila
HTH
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top