Problem with cascading dropdown

Status
Not open for further replies.

madpato

Member
Hello

I have a rather odd situation with the cascading dropdown element, turns out that the field thats supposed to make the relation between one table and the other is "empty" or with the option "please select" on the form i am trying to edit, and i have to go back to my other form press "save", return to the form and the correct info is there.
I have checked the database and the actual value is there, is just that the element does not show the information.
How can i fix this?
I belive this is strange, and maybe a chat with Hugh (when hes back) will help resolve things faster.

Regards.
 
As usual, I need a pointer to the page in question, and details of the element(s) you are having issues with, if they aren't obvious.

And of course, a screencast is worth a thousand words, so a Jing video of the problem may help.

-- hugh
 
I can't tell you exactly what the issue is, but it's something to do with the 'nivelgeneracion'.

When loading the options list for that cascading dropdowndown, the WHERE clause is:

Code:
asesor IN ('14') AND nivelgeneracion = 2 or nivelgeneracion = 3

The 'assesor in ('14')' is the "watched element" (FK) relationship, i.e. it's loading all Emprendadors whose Assesor is 14 ("Jose Lupo").

The nivelgeneracion part is coming from the WHERE clause you have added by hand to the CDD.

My guess is that for some reaosn, that nivelgeneracion is not being set correctly, or is being unset somewhere in your app, and only re-saving the Emprendador form for the selected user is resetting it correctlly.

Does any of this bring anything to mind for you?

-- hugh
 
So for example, if I added "or 1=1" to that WHERE clause to your Emprendador CDD, so it's ...

Code:
(nivelgeneracion = 2 or nivelgeneracion = 3 OR 1=1)

... meaning that it's always going to be true (because 1 is always going to = 1), then that field correctly populates.

WHich means that for whatever reason, at the time that form loads, nivelgenercaion is NOT set to 2 or 3 for the user you have selected (in this case, Cristobel Donoso Ibanez).

-- hugh
 
Thanks Hugh that fixed the problem, i will find a way to remove that field if thats causing the problem. Thank you!
 
Wish I could help more, but I have no idea what your app uses that 'nivelgeneracion' field for, or what it should be set to, when, or why going and re-submitting that form "fixes" it.

But at least you now know why it's not being displayed. :)

-- hugh
 
Status
Not open for further replies.
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top