How to pass Empty or Null value to a input text field from Excel sheet

i am not able to pass a (null or empty)data to a input text field from excel sheet.


1 Like

@karthikeyuan_subrama

can you explain little bit deeper as in your screen shot, your excel sheet has some validations hence it showed like “Name cannot be blank”

That’s a validation message i am passing from Excel and checking with if condition.

can you explain exactly what issue you are facing…

@venkat4u
If a pass a valid/invalid data from 2nd row ,data is getting passed and loop is executed. now the 2nd row is empty → while execution UiPath shows me element operation exception or selector exception ,etc etc… I am passing multiple test cases to check the form validations in a Web Application

Before you pass to webapplication remove the empty rows by using the filterdatatable

https://activities.uipath.com/docs/filter-data-table

@venkat4u
Form contains :

  1. Input text field.
  2. Create button.
    Secnario’s
    1 : Pass empty data to text field and click create button -->check Validation message
    2 : Pass Numeric data to text field and click create button → check Validation message
    3 : Pass symbol’s to text field and click create button → check Validation message
    4: Pass Invalid data to text field and click create button → check Validation message
  3. Pass Valid data to text field and click create button → check Validation message

I want to compulsorily pass empty or null data in side a text field from excel and click create button.so when i do this ,i will get a validation message .that i have to compare and check using IF condition.

In other words, if the input text field data is empty ,UiPath should skip input text field and directly click “create button”
.

@venkat4u How can we achieve this ?

Check whether the cell value is empty or not by using this in If condition String.IsNullOrEmpty(yourString) and enter the value if not and proceed the loop.

@Karthick_Settu
Can you give me an example file ?

in your case either you get object reference or index out of bound in your earlier comments mentioned you are getting selector exception or operation exception.

can you please provide the full exception stack trace.

@Karthick_Settu

as per his earlier comments he wants to pass null values. then how can he skip if the string is empty…

The excel file consists of some empty cells. If empty cells are found then he can skip the Type Into activity to enter those null values.

@venkat4u @Karthick_Settu

I am sharing xaml file and excel file . log.xlsx (12.8 KB)
cpm_countryList.xaml (129.8 KB)

@venkat4u @Karthick_Settu
Exactly ,if empty string value is arrived to the input text field, from Excel ,then it should skip and go to the next field ,if this also empty string then skip and go to another one. so this help me to check the validation message’s are working fine.

When you look at excel sheet name “Languages” → it has four coulmn’s
langName ,langCode,langStatus,langStatusValidation.

When you look at Web sequence inside -->CreateLanguage. (it has 2 input text field and 1 dropdown , 1 create button).
Type into–>languageName (langName)
Type into -->languageCode (langCode)
Select → Status Active/Inactive (langStatus)
Create → button.

Scenario 1:
Lets take 2nd row from excel ,the langName ,langCode and langStatus all contains empty string.

if 2nd row values are passed to the form -->since langName ,langCode and langStatus are empty strings. Uipath should skip Typeinto for langName, Typeinto for langCode and select activity for langstatus and should click on “Create button”.

Scenario 2:

Lets take 3nd row from excel ,langCode and langStatus contains empty string. langName has data.

if 3rd row values are passed to the form -->since langName contains data ,uipath should pass the data in typeinto for ‘langName’ activity and langCode, langStatus are empty strings. Uipath should skip Typeinto for langCode and select activity for langstatus and should click on “Create button”.

4th scenario : langName has data ,langCode has data , langStatus is empty.
Typeinto langName activity ,Typeinto langCode activity , skip langStatus and click create button.

5th scenario : langName has data ,langCode has data and langStatus has data.
now enter those data’s in Typeinto langName activity , Typeinto langCode activity ,select a data in select langStatus activity .Click create button.
Now the language Name,Code and Status(active/inactive) will get created and added to the list.
.
Basically i am doing this to check the each field validation’s. i pass empty ,numeric , special characters with different scenario’s.

i used IF condition to check wthr the String from excel is empty or not and proceeded the flow.

row.item(“column name”).toString.Trim=""

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.