You can translate the question and the replies:

How to set Value for 'Like' or Not Full Value

I am attempting to set an SetValue(^EncodeSeq(@County_Input)); My issue is that the drop down has the county name and the time it was updated. I need to know how to be able to select the value based on just the first word ignoring the time updated. Example: The County I want to select is ADA. The drop down menu has ADA as 'ADA - 9/30/2014 14:00' How can I set this to click The long version of ADA based on just the First word for the county ADA? Thank you
User
30-09-2014 17:01:26 -0400

2 Answers

Hi! First of all, the command SetValue sets the value of any editable HTML text-element, in this case and if you want to select the option in a drop down menu, the best function is SelectOptionByXXX. This function selects one option among those contained in a <select> element. If you record the navigation using the Denodo Toolbar and check the NSEQL code in the sequence, you will have something similar to: SelectOptionByText(regex:\\\\s*Huntington\\\\s*Beach\\\\s*,0,true); In this case, "Huntington Beach" will be selected in the drop down menu. In the previous command, the "regex" indicates that the value is a regular expression (JAVA regular expression). Therefore, you can modify the expression to indicate only the first part of the text, for example: SelectOptionByText(regex:\\\\s*Huntington\\\\s*.*,0,true); And, finally substitute the name by a variable: SelectOptionByText(regex:\\\\s*^EncodeSeq(@variable)\\\\s*.*,0,true); Regards.
Denodo Team
03-10-2014 07:47:29 -0400
Hi! First of all, the command SetValue sets the value of any editable HTML text-element, in this case and if you want to select the option in a drop down menu, the best function is SelectOptionByXXX. This function selects one option among those contained in a <select> element. If you record the navigation using the Denodo Toolbar and check the NSEQL code in the sequence, you will have something similar to: SelectOptionByText(regex:\\\\s*Huntington\\\\s*Beach\\\\s*,0,true); In this case, "Huntington Beach" will be selected in the drop down menu. In the previous command, the "regex" indicates that the value is a regular expression (JAVA regular expression). Therefore, you can modify the expression to indicate only the first part of the text, for example: SelectOptionByText(regex:\\\\s*Huntington\\\\s*.*,0,true); And, finally substitute the name by a variable: SelectOptionByText(regex:\\\\s*^EncodeSeq(@variable)\\\\s*.*,0,true); Regards.
Denodo Team
03-10-2014 07:47:38 -0400
You must sign in to add an answer. If you do not have an account, you can register here