Problem with data load inside modal

HI everyone

Got a bit of a strange issue here and not sure what is happening. May be a bug or a logic error on my behalf, i really don’t know at this stage

The page logic is:
make connection to list of users
make connection to audit table (no load)

List users in BS table with buttons in some columns
Using onClick() event of button,

  • set session variable to corresponding user ID (from table repeat values which is setting correctly)
  • load audit connection with user id set to session variable value
  • open modal and display audit trail in table inside modal

Unfortunately the modal shows the data from the previous query??
I have added a refresh button to re-execute the connection load event which then displays the correct data

Here is a video of it all:

auditissue.mp4 (12.3 MB)

Any ideas, i would be very grateful
Page is in secure admin panel but i could create a temp login if needed

Hey Brian, does it make any difference if this is set to auto load? I see the session value is being set properly in as in the modal header we see the right value.

Makes no difference, i just set it to no load as the session is not set at the time of page load so would be an empty data set anyway

Also - why using set session and then use this session value to filter the second query? Why not using the value returned by the table repeat region directly as a get variable for the second query?

Now my brain has imploded. That’s what i did first and had the problems, started using intermediate variable, same issue, then used session, same issue, just retried value from repeat again, works perfectly!

Problem solved thanks @Teodor although i am still intrigued as to why the other methods did not work, the logic still seems sound?

I also don’t see any logical reason for the other methods not to work. I will have to test a similar case locally to see what could be wrong.

Anyway - it’s always nicer (in terms of fewer steps to be executed) to directly access values from the repeat, rather than passing them to other variables and re-using them :slight_smile:

isnt sessions are updated after app connect already run?
did you try to use cookies? just to test of course

Yes, very happy with this way, much tidier

while you are looking into this can i tell you about another issue you may encounter when doing this.
When saving and then reopening the click event, the show modal event keeps disappearing (randomly) from the selected events list and has to be re added. I have experienced this a few times when using modal.show()

2 Likes

We are going to check this as well.

1 Like

Here is a video of the lost modal issue @Teodor

modalissue.mp4 (3.5 MB)

I know this is not a proper bug report but the video evidence is in this post above. I still have this issue with modal show/hide actions disappearing from actions @Teodor.

Was this investigated or did it get lost in the list?

I have seen this issue too. Its been so since past few version. But could not re-produce/record it like @Hyperbytes has, so didn’t report.
I do hope this get resolved.

@Hyperbytes
Click last selected action then save it
Please try

@s.alpaslan, Serhat, selecting the last item does not help, it has to be the modal show() / hide() entry. If that is specifically selected when you click Select to close the dialogue it does seem to save it otherwise it is often lost