Solved

Concatenate not working


Badge +4

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?

 

icon

Best answer by Willem 8 May 2023, 16:39

View original

3 replies

Badge +4

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. 

Userlevel 1
Badge +3

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.

Badge +4

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