Raja.G
(Mr.RPABot)
April 3, 2023, 9:29am
1
Hi Team,
I have to fetch details from SharePoint using CAML query i am using GetListItem , i want to set condition if particular value is null i should assign NA
Multiple data is there if i add 4 or 5 value is null i add condition na, it will throw exception for if condition is null why because if data availabel then only it will condition satisfied .
{“abc”,[xxx]},{“fff”,[yyy]},{“XYX”,[“null”]}.{“mmm”,[“kkkk”]
StringisNullorEmpty(dicarr_Details(0)(“XYZ”).ToString
Regards,
Raja G
Gokul001
(Gokul Balaji)
April 3, 2023, 9:34am
2
Hi @Raja.G
You can use an If activity with condition “DictionaryArrayVariable Is Nothing”
You can also use the null-conditional ?. operator to check if a dictionary value of key is null in C# .
Here’s an example of how to use it:
• Use ContainsKey method to check that key is exist in dictionary.
• Check for null using null-conditional ?. operator.
• If the result is null or empty string, you’ll set the name to unknown value
Check out the thread
Hi Everyone,
I have created a dictionary like
for each row of a table
Config(row(“key”).tostring)=row(“Value”)
Now i have created an array of the values using key as below:
Array={Config(“abc”).ToString, Config(“efg”).ToString, Config(“hij”).ToString, Config(“klm”).ToString}
now i have applied a loop to find the missing value
for each item in array
if
String.IsNullOrEmpty((item.ToString))
WriteLine = item+“is missing”
Here I am not getting anything in item as the value of item is empt…
how to check if object of String type is null
Regards
Gokul
1 Like
Anil_G
(Anil Gorthi)
April 3, 2023, 9:41am
3
@Raja.G
You can use IsNothing(dict("Key"))
cheers
Raja.G
(Mr.RPABot)
April 3, 2023, 12:55pm
4
Hi @Anil_G and @Gokul001 ,
Is null and is nothing all i tried but only data is available then only it will work if is null value in dictionaryArray wont give solution
My problem is any null value is there in DictionaryArray condition should True, i couldn’t able to set condition please help me for this
Regards,
Raja G
Anil_G
(Anil Gorthi)
April 3, 2023, 12:58pm
5
@Raja.G
Anil_G:
IsNothing(dict(“Key”))
The above should be working…did you include .ToString to this?
Can you show some screenshots please