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

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.
Here qtTransactionItem is TransactionItem of GetQueueItem activity.

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.


getting below error.

Object reference not set to an instance of an object

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

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.

1 Like