Help

Hello!,

i need a little help with t an application. i currently have a container app with 1 column and 2 widgets. on the top widget there’s a grid app displaying a list of clients. on the lower app another grid app showing the current open events.

i have a link on the client’s grid that opens a form that creates a new open event, and as soon as the record is inserted it shows on the second widget.

on the second widget a link to another form allows the user to close the event with a comment and then it dissapears.

but right now the only way for the new event to show on the second Widget is to setup a refresh interval, like +/- 10 secs.

I’d like to know how can i have the second widget to refresh when a change on the events table is made.

another question, is it possible to have the widget to resize dynamically?
for ex:
if no new events, second widget will be minimized, and first widget resizes its height to take all the space.

if a new event appears the second widget1 and 2 resizes to the default size.

Re: Help

anyone?

Re: Help

If you want the client to update when the server table is changed, you are going to have to refresh using an interval like you mention or make a call to the server manually. The client has no knowledge of what is going on at the server unless you tell it to check. This is true of any C/S app. The client has to ask the server … the server does not inform the client unless asked.

If the interval is not a solution you want, then you will have to setup something else based on the criteria you want using a AJAX call on the event you want to trap.

As for your other question, you would have to load tell the widget to load collapsed/expanded based on the grid items. I am not sure SC has a macro for this (albeit I have asked support).
This may have changed in recent releases, but I am not sure … as it has been a while.

You may have to find the HTML ID for the widget and make the JS call to collapse it yourself. You can also make adjustments to height using this approach.
document.getElementById(‘id_widget2’).height

Sorry I was not more helpful.

Regards,
Scott.

Re: Help

thanks for the answer Scott, i’ll try to find out how to do it.

A last question on this subject. is it possible to add on the widgets name a value obtained from the application running inside the widget?

lets say that i want it to display the number of open events, so if the widget is minimized the user can be informed if there are events that need to be attended.

Re: Help

Any progress on this