cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X

Conditional Event. Automatic page navigation.

Radu
15-Moonstone

Conditional Event. Automatic page navigation.

Hi.

 

I currently have set up a Navigation widget, so that once it's clicked, a popup mashup appears. I'm interested to have this popup display automatically between certain times of the day. How can I achieve this?

 

I was thinking of creating a service that checks whether the current time is within the time interval in which the popup should be displayed. But I can't bind the Service Invoke Completed event to the navigation event of the widget, because it would always display the popup when the service would run. 

 

I was thinking into exploring custom events, but I don't understand why an event needs a Data Shape assigned to it.  My second question is whether customn events can help me here, because I think I can create a custom event (why assign a data shape to it, though?) and call the custom event through the if-else loop that checks whether the current time is within the time interval that the popup should be displayed. But if I do that, there's no way I can bind any event to the navigation event. So I don't understand how I can use them to my advantage.

 

If anyone could help me, I'd appreciate it.

1 ACCEPTED SOLUTION

Accepted Solutions
Radu
15-Moonstone
(To:slangley)

Hi Sharon.

 

Thank you for your suggestion! In the end, I managed to solve this. I created a service that compares the current datetime to the datetime the popup is supposed to appear at. If it's after the datetime, the popup shows, if not, it doesn't. I bound an autorefresh widget to run this service every 60 seconds. Then the service result (true/false) is bound to a Validator expression that returns true if input is true and false otherwise. The All Data Changed of the service is bound to the Validator execution, and the Validator True event is bound to the navigation event of the navigation widget.

View solution in original post

2 REPLIES 2
slangley
23-Emerald II
(To:Radu)

Hi @Radu.

 

In regard to your Data Shape question, the premise behind this is to capture the details around the trigger for the event once it fires.  This will allow for troubleshooting, etc., if needed. 

 

For scheduling a popup at a specific time, have you looked at using a scheduler as an alternative to the way you were suggesting?

 

Regards.

 

--Sharon

Radu
15-Moonstone
(To:slangley)

Hi Sharon.

 

Thank you for your suggestion! In the end, I managed to solve this. I created a service that compares the current datetime to the datetime the popup is supposed to appear at. If it's after the datetime, the popup shows, if not, it doesn't. I bound an autorefresh widget to run this service every 60 seconds. Then the service result (true/false) is bound to a Validator expression that returns true if input is true and false otherwise. The All Data Changed of the service is bound to the Validator execution, and the Validator True event is bound to the navigation event of the navigation widget.

Top Tags