Hi,
How can I assign null to a varchar field in MS SQL using "Insert Row (V2)" action by checking a condition.
In the below example, I have a simple table (WCC_Testing) having 2 data fields.

When I directly put @{null} in the data field, it is correctly assigned NULL into the table.


However, if I use @{if()} to evaluate and then assign null, it inserts empty string rather than NULL to the table.
If this case, I have a variable 'vTest' with initial value @{null}, then in the insert row action, I put @{
if (empty(variables('vText')), null, variables('vText'))}, trying to assign null to the datafield. However, it is not a NULL in database but empty string.


I would like to put NULL in database base on the evaluation result in the if statement. What's wrong and how to fix it?
Thanks for any help.