Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a few listboxes which have different show conditions. These show conditions are variables that I define in my loadscript. Everything works as expected in the .qvw and the list boxes appear and disappear as expected.
However, when I view the document in AJAX this behaviour isn't replicated, once a listbox disappears it never seems to appear again. I've had a look at the HTML and it seems to set the display to none and this doesn't seem to get undone in the HTML when it should and does in the .qvw
Is there some kind of bug with show conditions with .qvws in AJAX? As I really can't seem to get my head around why it doesn't work.
So I have a listbox with a "Mode" selection.
My variables are defined as the following:
SET vShow1 = IF(MODE_KEY = 2, 1, 0);
SET vShow2 = IF(MODE_KEY = 1, 1, 0);
SET vShow3 = IF(MODE_KEY = 2, 0, 1);
SET vShow4 = IF(MODE_KEY = 2, 1, 0);
My Section Access is defined as the following:
LOAD DISTINCT
UPPER(USER) AS NTNAME
,'ADMIN' AS ACCESS
What is rather odd is that making a selection in the "User" field can trigger the listboxes to reappear, but making a selection in the "Mode" field doesn't cause the triggers to reappear. As I said, I don't replicate any of these issues directly on the .qvw itself but I do experience them when it is looped, reduced and section-accessed via AJAX.
Hi,
Thanks for the help.
I commented out all of Section Access, reloaded, looped and reduced.
However I am still getting this issue so I think we can discard this as the cause of the issue. There are certain situations where I can seem to trigger the listbox to reappear.
The listboxes show conditions are entirely dependent on the "Mode" selection made by the user. However some users have access to multiple users and when making a selection in the "User" selection, the listboxes seem to be triggered to appear as usual, which I find quite unusual and seems to point to the ShowCondition not being consistently evaluated on selections. The real issue here is that making a selection in "Mode" doesn't reappear the listboxes as it does in the .qvw.
Hi,
I did try inspecting this. Mode can only ever be 1,2 or 3. And I traced that Mode matched to what it should do. It just seems to be something in the way AJAX along with this .asp file is driving the workbench for this since it works perfectly fine on the .qvw side but not on the web via AJAX and .asp. And since we've ruled out Section Access, I think my only solution might be to write some javascript that works off of the same logic to make it work in the workbench.
Because MOD_KEY is a field, you need an aggregation in your conditions, for example:
SET vShow1 = IF(Max(MODE_KEY) = 2, 1, 0);
- Christian
Hi,
I tried this with the MAX and the issue remains.
Thanks,
Jamie