Solved

Cannot clear lookup field SharePoint SmartObject

  • 15 September 2017
  • 1 reply
  • 5 views

Hi, 

 

I am trying to do something fairly simple. I have list A that is connected to list B via a lookup field. I had K2 auto-generate forms and views for list A. I create a new item with a value selected for the lookup column. I edit the item I just created and try to clear the value by selecting the empty option in the dropdown in the SmartForm. The lookup value in the list remains set. Is anyone else experiencing this? 


Things I have tried to do to resolve: 

  1. set the value as 0
  2. set the value as scnull
  3. set the value as a single space
  4. changed the field type from number to text

Nothing seems to work! Any help is greatly appreciated. We have Appit version 1.5 update 6

 

Thanks,
Kevin

icon

Best answer by KevinStone 18 September 2017, 18:21

I found a potential workaround, but the behavior still seems buggy. It looks like if I use an expression: if (Drop-Down Control = 0, 0, Drop-Down Control) to set the value for the lookup column in the Update List Item By Id SmartObject Method, it seems to work. What I cant figure out is why? If the drop-down control is equal to 0, how is using an expression that resolves to 0 any different? Is it a string vs integer thing?

View original

1 reply

I found a potential workaround, but the behavior still seems buggy. It looks like if I use an expression: if (Drop-Down Control = 0, 0, Drop-Down Control) to set the value for the lookup column in the Update List Item By Id SmartObject Method, it seems to work. What I cant figure out is why? If the drop-down control is equal to 0, how is using an expression that resolves to 0 any different? Is it a string vs integer thing?

Reply