User Databasejoin element showing ID, not label

emcguire

Member
I have a databasejoin element that is a user field. no matter what I select in the options, it always shows the userid, I need it to show the name. Is this not possible?
 
I can't replicate this.

The only situation in which the user plugin would ignore the "show" setting is if it thinks it is not on the default J! database.

One other thing - have you recently restored this site from another machine, or copied the Fabrik metadata tables (#__fabrik_forms, etc) over?

Check your Fabrik connections. Edit the 'site default' and see if it complains about not being the same as the J! site connection.

-- hugh
 
It's def not the site connection, all is good there.

Interesting though, This site was duplicated from another site with fabrik on it, and also this particular list (where the user field is) was an import from a csv (this data was originally a access db). I did successfully convert the userid field in that import field to a legitimate J! user field and connected the users to the corresponding J! user.

I'm wondering now if this might be causing the issue, although I converted everything perfectly. nothing wrong with that list. It displays the name just fine when looking at that list itself. It is when I am using a databasejoin field (to that list) in another form that the issue arrives.

If this was a copy, is it possible something could be wrong with the Fabrik metadata tables?

I think I am going to subscribe to Pro Support. I am way behind on this project and I normally don't have much issue with building with Fabrik, but this particular app has been giving me fits. You guys have been very helpful and I appreciate it, I have a feeling I may have more questions.

Thanks
 
Maybe this helps. In db I have id and my label that I will show in form is field "label" from table "sc_exercise_category"

- github update fabrik?
- access levels?
- language files joomla?
 

Attachments

  • 05-02-_2017_21-47-09.jpg
    05-02-_2017_21-47-09.jpg
    104.6 KB · Views: 112
Oh, I misunderstood what you were saying, I thought you meant you had a user element.

OK, that's expected. Because although you've selected "label" as your label, if that field is actually a Fabrik 'user' element, which is just a special case of a join that always stored the 'id' as the FK, then the value in that is going to be a userid. Fabrik is smart, but it's not smart enough to know that the field you select as the label on your join is actually a join to yet another table, and automagically figure out what it's a join to and how to get the label from that join.

What you need to do is create a "CONCAT label", which does ...

Code:
(SELECT username FROM #__users WHERE id = '{thistable}.label')

Leave that exactly as is, don't change {thistable}.

So you are manually getting the username (or whatever you want, make it name or email or whatever valid fields from the #__users table you want) by selecting it from the users table, using the FK value stored in your 'label' user element (ie the PK id of the users table row).

-- hugh
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top