EVAL function in ServiceWatch

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-08-2015 11:24 PM
I see that there are many places where EVAL function has been used. I could not find anything in the ServiceWatch documentation about this. Can someone please help explain this function, its uses and use cases where I can use this with some good examples that are generic and can be applied at any place if required. Thank you!
- Labels:
-
Service Mapping
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-17-2015 09:44 AM
Hey Ankush,
The EVAL function is used to basically evaluate variables and do "stuff" to it. You'll mainly use it to create if, then functions to transform certain fields in tables or any other variable you want to manipulate.
For example we had one business service where the entry point port was either 80 or 443 going into a load balancer and creating an outgoing connection from the load balancer using 80 or 443. However, in the loadbalancer itself there was some logic to redirect 80/443 to 8080/8443 but it wasn't being picked up by ServiceWatch. So in the example in the screenshot below we used the EVAL function to change 80 /443 to 8080 /8443 for some specific IPs.
Let me know if that makes sense - I can find other examples if needed.
-Saadi

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-22-2015 04:05 AM
Thanks Saadi. That info is definitely helpful. But I wish to understand more about this, like what language/syntax is being used in EVAL? It would be nice if we can have some more use cases where the only option left is to use EVAL function.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-04-2016 06:56 AM
I'm pretty sure it's javascript. The use case I gave you would most likely be a common one - you'll want to use it as a means to modify the content in a table or field or set variables based on content in another table or field. It's not something we've used regularly, we've only had to use it a handful of times. Sorry I couldnt be of more help, as I come across instances where I use it I'll be sure to update this thread.