Active IQ Unified Manager Discussions

Functions in a user input query?

dblackwe
2,558 Views

I want to be able to include one of my fucntions in a query for user input.  Is this possible and if so what is the formating?

 

I tried 'where vserver.name like '%getSVM(${svm})%' but that didn't work (the function takes a customer name, converts it to a two letter code, so the vserver would have that two letter code in it, thus the like %%.

 

I also tried '%{getSVM(${svm})}%' which also didn't work.

2 REPLIES 2

sinhaa
2,538 Views

@dblackwe

 

...the function takes a customer name, converts it to a two letter code

 

-------------

 

The WFA MVEL fuctions can't be called inside a mysql query.  I suggest you use MYSQL fucntions to get this done instead of WFA  fucntions.

 

Whatever logic you are using to convert the provided customer name into 2 letter code, it must be possible using Mysql fuctions. 

 

See here.

 

If you can't figure it out, provide your Query and the MVEL fuction and I can give it a try.

 

 

sinhaa

 

 

 

 

If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.

dblackwe
2,529 Views

Thank you so much for the response.  That is upsetting but understandable.  I will simply go forward with a user entered volume name instead of a dropdown list.  Thank you for the offer to try and figure it out for me, but you have already been more than helpful responding on a weekend.

Public