Skip to main content

I have a K2 Smartform connected to a SharePoint list. I have 2 fields on the form that the user populates. Both are text fields (GL Name and GL Code). However, I have regex validation on the GL Code so that it is a 6 digit number.

I have another field that I am trying to populate with an expression in K2. That field is called GL and the logic is as follows…

IF GL Name = “OTHER” then concatenate GL Code + “ - “ + GL Name else GL Name. 

This is how I built the expression.

 

This is what I get in SharePoint. The IF part is working but the concatenate is not working. This seems like it should be simple. What is not working?

 

The IF part of the expression works. And, if I use just the concatenate part of the expression, it works, but when I combine them, it does not work. 


Hi FreeRangeDingo, 

Thanks for logging a ticket for this. I am responding here, just to close the loop, and post the issue resolution here.

 

For the most part your expression was correct. The only part that was “missing”, is that you typed the equal sign (AKA: “=”) instead of using the “=” sign, under the “Context browser” > “Operators” > in the “Logic” section.

 

After we implemented that, the expression worked as expected.

 

Thanks, and regards,

Willem.


It is strange though that my first statement worked with the typed in equals. It failed only when I combined it with the concatenate. 


Reply