There are 2 local variable:
local!test1 : "CRIS3-AB; CRIS3-AB; ; ; SOECS; SOECS; ; ",
local!test2 : "; ; Related FOX; Related FOX; ; ; Trace; Trace",
If no value available before semicolon symbol of local!test2 then a value from local!test1 should take place
Desire output : " CRIS3-AB;CRIS3-AB;Related FOX; Related FOX; SOECS; SOECS; Trace; Trace"
Discussion posts and replies are publicly visible
I am not sure how your description matches the desired output, but I got some code to share:
a!localVariables( local!test1 : "CRIS3-AB; CRIS3-AB; ; ; SOECS; SOECS; ; ", local!test2 : "; ; Related FOX; Related FOX; ; ; Trace; Trace", local!test1Splits: split(local!test1, ";"), local!test2Splits: split(local!test2, ";"), if( a!isNullOrEmpty(local!test2Splits[1]), a!update( local!test2Splits, 1, local!test1Splits[1] ), local!test2 ) )
Shon this error :
Interface Definition: Expression evaluation error [evaluation ID = I48HU] : An array of components may only contain components. Received Text at index 1.
Again, I am not sure what you are looking for and you initial ask lacks any level of details and context. My recent podcast episode might be of interest for you: https://appian.rocks/2023/12/20/episode-13-how-to-get-your-questions-answered/
The code snippet is an expression rule, and will not work in an interface.
I want, If no value available before semicolon symbol of local!test2 then a value from local!test1 should take place.
OK. Feel free to adapt my code to fit your needs.
If you can elaborate more on the usecase we might be able to provide alternative solutions.
Abhay Dalsaniya The issue is resolved now
Hi rishukumarg1965 ,
You can try this code
a!localVariables( local!test1 : "CRIS3-AB; CRIS3-AB; ; ; SOECS; SOECS; ;", local!test2 : "; ; Related FOX; Related FOX; ; ; Trace; Trace", local!array1:reject(fn!isnull,split(local!test1,";")), local!array2:reject(fn!isnull,split(local!test2,";")), a!forEach( items: enumerate(length(local!array1))+1, expression: if( a!isNotNullOrEmpty(trim(local!array1[fv!index])), local!array1[fv!index], local!array2[fv!index] ) ) )
Good to know!