Former HPE Products
cancel
Showing results for 
Search instead for 
Did you mean: 

LeanFT - ListBox - dropdown with numbers not selecting correct item with text

 
Bageesh
Occasional Visitor

LeanFT - ListBox - dropdown with numbers not selecting correct item with text

Trying to select an item from dropdown which has numbers as items. On providing the item text not selecting the correct item, instead considering it as index for listitems.

Dom structure:

<select data-ctl="[&quot;Dropdown&quot;]" class="cba_main" id="NoOfDependants" name="$PpyWorkPage$pAssessment$pFinancialSituation$pNoOfDependants" validationtype="required" data-change="[[&quot;postValue&quot;,[&quot;:event&quot;]]]" style="width:100%">
<option value="" title="Select how many dependants">Select how many dependants</option>
<option value="0">0</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option selected="" value="9">9</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
<option value="13">13</option>
<option value="14">14</option>
<option value="15">15</option>
<option value="16">16</option>
<option value="17">17</option>
<option value="18">18</option>
<option value="19">19</option>
<option value="20">20</option>
<option value="20+">20+</option>
</select>

Code written for selection:

Attempt1:

<listobject from application model>.Select("10") -> this selects "9" instead of "10"

attempt2:

ListItem item = <listobject from application model>.GetItem("10)

<listobject from application model>.Select(item) -> selects "9" instead of "10"

Providing "20+" selects as expected. 

 

 

2 REPLIES 2
Dennis Handly
Acclaimed Contributor

Re: LeanFT - ListBox - dropdown with numbers not selecting correct item with text

This is the wrong forum (and in the future the wrong company) for software questions.
https://community.saas.hpe.com/

Bageesh
Occasional Visitor

Re: LeanFT - ListBox - dropdown with numbers not selecting correct item with text

sorry for the inconvenience. Thanks for pointing me to correct community 

 

Thanks

-Bageesh