Hi I am getting the below mentioned error because I am getting the null value in a drive item
Assign: Object reference not set to an instance of an object.
How to resolve it?
Hi @Kunal_Jain
What you are going to achieve in that? Can you elaborate little bit more?
In the If activity you can use like this
String.IsNullorEmpty(YourInputString)
Regards
Gokul
Hi @Kunal_Jain
What is the variable Refer datatype ?
Is it boolean?
if it is boolean why have you passed like this?
You can directly pass the Refer
and what is the variable that you have assigned in Find files and folders activity?
Regards
Sudharsan
I have to check if the find reference variable is empty or not
And after finding if it is empty or not carry on with the further process
If possible share the sample XAML file? @Kunal_Jain
Can you tell us what is the expression that you have passed in the Assign activity
Regards
Gokul
It is the first reference of find files and folders
It is the First file or Folder matching the specified Query
What is the variable that you have used in the activity find files and folders activity? @Kunal_Jain
Delete the Assign activity and directly pass that value in the If activity and check it
Still getting the same error
Hi @Kunal_Jain
Can you share the expression in the If activity and Assign activity
In the if activity I have used
String.IsNullorEmpty(firstReference.ToString)
And I have deleted the assign activity
What is the output comes from this variable?
Regards
Gokul
Thanks for your Help
I got the solution instead of checking the first reference variable i.e. Drive item,we can check myfiles variable i.e. array of drive item.
And to find if the array is empty or not simply use
strArray.Length = 0
Cheers
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.