- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
I was helping a user on the forum who had requirements that was something like this:
- Wanted one button (UI Action) which would make a popup window appear.
- The window should give the user a couple of choices and depending on the choice, field(s) should be set on the form and then the form should save.
The difficult part here in my eyes was how was I going to get the values from the UI Page back to the form after the user have made their choice and pressed OK.
I was looking through the forum and what I could find was that you could save the choice in a temporary table which then the ui action(server part)
could fetch and put in the form. Since I don't wanna have a table only for this, that solution wasn't an option.
Next thing that came across my mind was to perhaps use the GlideSession API and clientData methods. but I ain't really so happy about using
the clientData for some value holders and have come across some weird problems when the session data isn't emptied correctly. So this turned out to not be an option either.
But after some testing I discovered that the solution was much more simpler than the above.
I just put the "g_form.setValue" after I have destroyed the popup window in the client script part of the UI Page.
To give a simple example:
Here is the UI Action that is only creating the popup window:
And here is the UI Page "whyHold" that the UI Action calls for.
I just put a few radio buttons and a Cancel/OK. in the "I have no imagination" I just take the value, put it in short description and saves the form.
If they don't choose any option, then OK button won't work.
I hope this will give you some ideas of what you can do.
//Göran
- 5,743 Views
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.