Hi @Michael Hansen , Please try using IIF(CSANSWERS.Value>0 and CSANSWERS.Value <10000, true path , falsse path). ** In this case use the expected range of integer values.
Thanks
Unfortunately I still get the error on exporting.
Error:
Time 00:05; Conversion failed when converting the nvarchar value 'HG-6/TJX-4' to data type int.
My Code is (there’s more surrounding it, but it seemed obfuscating to the topic):
=iif(iInventoryItem.EAPACK_Attributes]>0 AND AInventoryItem.EAPACK_Attributes]<1000,
>InventoryItem.EAPACK_Attributes],1)
My Values are pack sizes for goods, so 48 is pretty much my top end integer value.
Hi @Michael Hansen The other logic you can try is to check the first character in the string as shown below.
iif(
Left(LTrim((InventoryItem.EAPACK_Attributes]),1) =’0’
Left(LTrim(TInventoryItem.EAPACK_Attributes]),1) =’1’ or
Left(LTrim(fInventoryItem.EAPACK_Attributes]),1) =’2’ or
Left(LTrim(pInventoryItem.EAPACK_Attributes]),1) =’3’ or
Left(LTrim(/InventoryItem.EAPACK_Attributes]),1) =’4’,iInventoryItem.EAPACK_Attributes],1)
** as the Max value is 48, I just added the range till ’4’.Extend it till 9 if required.
Thanks
Hi @Michael Hansen The other logic you can try is to check the first character in the string as shown below.
iif(
Left(LTrim(mInventoryItem.EAPACK_Attributes]),1) =’0’ or
Left(LTrim(LInventoryItem.EAPACK_Attributes]),1) =’1’ or
Left(LTrim(eInventoryItem.EAPACK_Attributes]),1) =’2’ or
Left(LTrim(Left(LTrim(** as the Max value is 48, I just added the range till ’4’.Extend it till 9 if required.
Thanks
That is cheating! I love it. Sure it’s a bit unwieldy, but until we get formal type checking, this is awesome-sauce. Thank you so much!
Hi @Michael Hansen Good to know that the solution worked.
Thanks