How to check qtTransactionItem.SpecificContent("name").ToString is empty?


#1

Hi All,

How to check if there is no item in queue?
If queue is empty after fetching the last item from queue.
code is given below.
qtTransactionItem.SpecificContent(“name”).ToString.
Here qtTransactionItem is TransactionItem of GetQueueItem activity.


#2

Hi try you can use string.IsNullOrEmpty(qtTransactionItem.SpecificContent(“name”).ToString)

Or you can simple get item and then use qtTransactionItem IS NOTHING

Hope this helps.

Tim


#3

getting below error.

Object reference not set to an instance of an object


#4

after Get Queue Item activity use if statement with qtTransactionItem IS NOTHING

-string.IsNullOrEmpty(qtTransactionItem.SpecificContent(“name”).ToString) will throw as there is nothing for it to get the specific content on


#5

Thanks a lot TimK.

strCompType= if(isNothing(qtTransactionItem),qtTransactionItemA.SpecificContent(“strARGCompTypeA”).ToString,qtTransactionItem.SpecificContent(“strARGCompType”).ToString) is working fine for me.

I am using above code in assign activity.