UiPath: Type Excel values into Form fields

Hi,

I have an Excel dt_test with columns HSE1–HSE15. Each row has a variable number of HSE codes (e.g., 4–10).

I need to type these values into a JotForm with **10 identical textboxes.
All textboxes have the same

selector, and there’s only one anchor for the first textbox.

Problem: UiPath types all values into the first textbox.
I tried Anchor Base, Type Into + Tab, and dynamic selectors, but none worked reliably.

Question: What’s the best way to type HSE1 → HSE10 dynamically in UiPath for this scenario, handling empty cells safely?

HSE.xlsx (9.1 KB)

Thanks!

1 Like

@MD_Farhan1

use idx in your selector ..idx 1 will be first box, 2 is second etc

to handle empty, use if condition with check on the value…

Also you can use a loop and when if condition fails end the loop using break

cheers

Hi Anil_G,

below i attached workflow for your reference.

above workflow enter value in same text box

1 Like

@MD_Farhan1

Awseom all of it looks proper

just open the selector in type into and add idx='{{currentNumber}}' in the last line of the selector

Eg: <webctrl tag='td' name='xyz' idx='{{currentNumber}}' />

cheers

Already i tried once click validate that one is removed.
Target:

<webctrl tag='INPUT' type='text' class='form-textbox validate[required]' aaname=' Test* ' matching:class='fuzzy' fuzzylevel:class='0.0' fuzzylevel:aaname='0.0'

Anchor:

<webctrl tag=‘LABEL’ type=‘’ class=‘form-label form-label-top form-label-auto’ aaname=’ Test ’ matching:class=‘fuzzy’ fuzzylevel:class=‘0.0’ matching:aaname=‘fuzzy’ fuzzylevel:aaname=‘0.0’

@MD_Farhan1

can you please show a screenshot

also use strict selector not fuzzy..no anchor is needed

cheers

@MD_Farhan1

Select single match

and then first test with using idx=‘1’ and idx=‘2’ if it highlights right text box

if that works then add the variable

cheers

How to do this because i am fresher.

1 Like

@MD_Farhan1

Select single here

image

after aaname=’ Test* ’ add idx=‘1’ and click on validate …next change to 2 validate and check if it highlights second box..if yes then select 2 and then click insert variable and insert the currentNumber Variable

cheers

cheers

Hi @MD_Farhan1

Because all the textboxes have the same selector, UiPath will always type into the first one. The simplest way is to click the first textbox once, then loop HSE1 to HSE10 and type the value followed by a Tab to move to the next box. Just check for empty cells before typing and still send Tab so focus moves correctly. This approach is much more stable than anchors or dynamic selectors.

Hi @MD_Farhan1 ,

Using the Excel file and the web form you provided, I created a sample project that uses the modern Find Elements activity to get all the input elements you want to fill in.

ExcelToFormFields.zip (318.5 KB)

The Find Elements activity uses this Filter to get all the input elements within the UL element: "<webctrl tag='INPUT' type='text' parentclass='form-sub-label-container' />" (other possibilities for defining the filter can also be found).

The attribute values ​​for each INPUT element can be checked in UI Explorer, to see which are common and which differ.