juser plugin not syncing Juser ID with Fabrik List User ID

nrsmoll

Member
Having a bit of trouble with the juser plugin.
It doesn't seem to synch the J! user id with the Fabrik created ID.

I have a "New Patient" form, which is meant to create a new J! User ID. I would like the user created in "New Patient" form to fill out a form, after selecting his/her record in a list . The list (List 77) is pre-filtered using his user ID. The form is a "Patient-driven Outcome Measures" form.

The problem occurs when I set the pre-filter setting in lists, it finds no records when logged in with the user. Eg. User/Patient "X" has ID 13 in J! user ID, and ID 54 in Fabrik.

My pre-filter is:
Code:
WHERE User(raw) EQUALS {$my->id} TYPE text APPLY TO public

Is this a juser problem, or a prefilter issue?
 
OK, it looks like the problem is that in your New Patient form, in the juser plugin settings, you have selected 'id' as the "User ID Field". You can't do that. The 'id' is the primary key of that New Patient form. It is automatically assigned, as an auto incrementing value.

You need to create a separate 'user_id' field in that New Patient form, and use that to store the user ID.

Although I'm slightly confused by "I would like the user created in "New Patient" form to fill out a form, after selecting his/her record in a list".

-- hugh
 
That was the solution!

I created a field element "juser_id" to sync with the J! user id when the record is created.
The pre-filter that works is the following:
Code:
WHERE juser_id EQUALS {$my->id} TYPE text APPLY TO public

To avoid some newbies time troubleshooting (like me), the {$my->id} input, is not a placeholder, just copy paste it.
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top