If else going wrong, going always true

Hi All,

i have one issue, i have written that bot will check if there is no data in datatable, then it should execute then activity, but it always going to else part.


how to fix it

@RAKESH_KUMAR_Tiwari ,

Just put dt_Template.Rows.Count=0 and check

Did you check in Immediate pannel before entering to If condition that your dt_Template Count is 0?

Regards

Hi @RAKESH_KUMAR_Tiwari
Use this Condition in IF Activity.

Dt_Template is Nothing or Not Dr_Template.Rows.Count>0

This will surely work.

Regards

Hi @RAKESH_KUMAR_Tiwari

inside If condition
Just mention only one condition is enough for the scenario.
Dt_template.rows.count=0

Thanks
VP

above if else there is a filter, i don’t know it is filtering the data, i can see that it has no records, but when i am counting the rows after filter it gives row count as 1.

image
1

@RAKESH_KUMAR_Tiwari

  1. Check for multiple variables with same name
  2. Check from locals panel if data is coming

cheers

1 Like

Hi @RAKESH_KUMAR_Tiwari

1.Kindly confirm whether the Datatable has record or not.
could u please take a screen shot of Watch table with the value of dt_template

so we can find the solution

1 Like

Hi @RAKESH_KUMAR_Tiwari ,

Kindly check if the data table you are referring to has data by debugging.

Regards,

1 Like

yes, it was refering to different one, thanks, working fine

1 Like

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