Hi WinCC OA community,
I have a library function that executes a dpQuery() to Oracle. I'm catching any errors with getLastError and would like to give the user some feedback in case of errors by opening a popup panel in the UI which should be a modal child panel on top of our alert panel (which will be open at the time of the execution of this library function).
I know that a "ChildPanelOnCentralModal" won't work from within the library since it's missing the context.
Can I realize this still from within the library without returning the error message all the way to the alert panel?
Thanks and have a good day!
Paul
Open Panel from within a library
- leoknipp
- Posts:2928
- Joined: Tue Aug 24, 2010 7:28 pm
Re: Open Panel from within a library
A function defined in a library (file in scripts/libs) can be used in any WinCC OA manager which can execute CTRL code.
If you call this function in a UI you can open a panel to give the user a response if the function was successful or not.
Best Regards
Leopold Knipp
Senior Support Specialist
If you call this function in a UI you can open a panel to give the user a response if the function was successful or not.
Best Regards
Leopold Knipp
Senior Support Specialist
- polsterp
- Posts:3
- Joined: Fri Mar 04, 2016 12:25 pm
Re: Open Panel from within a library
Thanks Leopold for your quick response.
I realize that I can work with the return value of the library function however I would like to return the caught error of the dpquery() and display that in a popup. However I would have to pass a dyn_errClass variable as parameter for the library function to retrieve that error and get it back into the panel that was calling the function.
Is this my only option or could I open the popup from within the library function directly? Maybe if I know the modulename and such?
I realize that I can work with the return value of the library function however I would like to return the caught error of the dpquery() and display that in a popup. However I would have to pass a dyn_errClass variable as parameter for the library function to retrieve that error and get it back into the panel that was calling the function.
Is this my only option or could I open the popup from within the library function directly? Maybe if I know the modulename and such?
- polsterp
- Posts:3
- Joined: Fri Mar 04, 2016 12:25 pm
Re: Open Panel from within a library
I decided to return the error now through a parameter of the function as (dyn_errClass &err) and then evaluate this in the panel to open a childpanel popup.
Thanks for your input and have a good day!
Paul
Thanks for your input and have a good day!
Paul