@Robert I don't know whether below requirements already built in or we need to write a new code for this. Please provide me detailed answer. a) First and foremost thing, when user enter input search value, I need validate using regex like this Ex: txtOperator.replace(/^\s+|\s+$/g, ''). b) I need to add a expression value which should search for 2 (or more) columns. But on display, only single input is provided Example : Search Expression: Name will be searched in OPER_NM or OPER_NAME whereClause + "and (upper(OPER_NM) like '%" + txtOperator + "%' or upper(OPER_NAME) like '%" + txtOperator + "%')"; c) Need to have input - which takes a list separated by commas, internally this will be split using commas and add in list and create a where clause?. I think this is new requirement d) In attribute result, I need make some column values are hyperlinks - if data start http:// or www.. I need to display as hyperlink e) I need a set a search expression with radio buttons a) or b) or c) ... how to make this?
Solved! Go to Solution.
S R,
This is why I dislike multi question threads because you have to take time and answer each question and then likely spend more time clarifying or answering sub questions to the multiple questions...
S R,
First and foremost thing, when user enter input search value, I need validate using regex like this Ex: txtOperator.replace(/^\s+|\s+$/g, '').
This is not something supported by the widget and you would have to add it to the code.
I need to add a expression value which should search for 2 (or more) columns. But on display, only single input is provided
You just click the "Add Expression Value" again in the configuration UI and you specify the OPERATOR to be AND or OR.
Need to have input - which takes a list separated by commas, internally this will be split using commas and add in list and create a where clause?. I think this is new requirement
This is what the "IN" operation in the expression value dialog does in allows you to use a SQL statement like FieldName IN ('value1','value2','value3'). There is no need to split the values by the comma as the SQL IN operator allows for a comma separated list to be used.
In attribute result, I need make some column values are hyperlinks - if data start http:// or www.. I need to display as hyperlink
There is nothing in the widget code that interrogates the results to look for a http or www. You add a link in the widgets configuration UI to specify what links you want in your results.
I need a set a search expression with radio buttons a) or b) or c) ... how to make this?
I have never considered adding this ability so I have no advice for you there. Why would you need radio buttons and not just select a value from the dropdown using the "Predefined" user list ability available in the widget?
Thanks for Robert for detailed answer.
a) Which file needs to be edited for adding regex in input validation. Sorry I didnt go through entire JS files. I am fairly new to JS world and WAB.
b) I understand OR operator needs to be used. But in final widget screen I need to see single input text box, but when I un-check "Ask for values", screen looks like this. I want one input text box which should search multiple columns using OR condition.
c) I will try with IN condition
d) My question - when I include all fields, some of the columns contains value which is URL. This needs to be displayed as hyperlink in result window. I dont see any option to set a specific column as hyperlink.
e) My current application has options listed as a radio button , where user can see the choice and select and map /results changes accordingly.
Robert, Can you please answer above questions. Thanks in advance.
S R,
This is why I dislike multi question threads because you have to take time and answer each question and then likely spend more time clarifying or answering sub questions to the multiple questions...
Robert, Thanks for being supportive always.