Issue related in Assign: Object reference not set to an instance of an object

I will upload my code screenshot cloud you please give the solution ?
I have three separate sequence as LoginFile for excel Read , UI Caputer for login Page other one is main sequence.
This is My Excel File

I am beginner for UI Path

Hey,

Could you check you datatable dtCredentais if its blank, this error usually comes then.

Also to get values from a dt without looping here is the syntax:

dt.Rows(RowIndex).Item(“Column Name”)

Cheers

Hey Thanks for the reply . can you tell me what did you mean
" datatable dtCredentais is blank " ?

Hey,

the datatable in your output datatable activity , can you check in locals panel when you debug if you see any value in the table ?

If you share what you have in RHS of assign, i can guide you more specifically.

Thanks,
Prateek

@sarathic

In the read range workbook did you assign dtcredentials as the output datatable in properties?

As per error the variable you are using is emptor null

Cheers

Hi @Anil_G ,

Here my workflow

Hey if you are reading excel and assigning datatable here, why is it In/Out type ?

After output datatable put a log message to display datatable, your xaml should fail there, if thats the case ?

Could you check in local panel when you debug.

Just take dtCredentails as a variable and not argument if you just want that to extract values.

Thanks,

@sarathic

Can you please show read range properties

You declared datatable but data is not provided I believe

Cheers

No I got this error also. Please help me to resolve this :frowning_face:

@sarathic can you upload your workflow?

Hi @raja.arslankhan

There is UI page activity capturing sequence.and this is my main workflow

Inside the UI page capturing activity
There is
Use Browser activity
For each row activity
Type in to activity for username
click activity
another
Type in to activity for password
again Click activity

As Argument there is Inusername and InPassword

You can find my Data table SS top of the page.

Many Thanks

@sarathic its difficult to figure out your actual problem on screenshots

while debugging the code go to watch panel and declare the variables which are used in this sequence to checkout which of this variables is null

After finding check if the values passed to selected variables is send empty or no and make changes as per the same !!

Now I got this for this. How is this is empty or do anything from the UiPath

Hey,

  1. If you are reading table in Login File then it should be of only “out” type not “In/Out”.
  2. Your datatable is null as i can see from Locals panel, for this click on import arguments and check if you have passed the dt correctly to Login Page from Login File.
1 Like

This is cause
1 Your Argument direction passed maybe incorrect
→ If you are passing datatable from one workflow to other Use in or else if you are not sure with the Argument flow let me know
2 before using the dataflow in sequence use log message or writeline to check if your datatable is not empty !! let me knw if u need more clarification as u are new to this