7 Replies Latest reply: Jan 23, 2013 6:43 AM by jagan mohan rao appala RSS

    sanity check...

    ioannis giakoumakis

      Hi all.

      I have a table with 5 values, and I need to concatenate those values forming a string. Since I am going to use this string to load from a table, the 5 values actually represent field names so I need to put them into brackets, because there are spaces in the names.


      So I thought of looping through the table and construct the string like this :


      SET sectionAccessKeyFields='';


      FOR currentFieldNameIndex=1 TO FIELDVALUECOUNT('KeyField')

                LET currentFieldName=FIELDVALUE('KeyField',$(currentFieldNameIndex));


                SET sectionAccessKeyFields=$(sectionAccessKeyFields)[$(currentFieldName)];




      The strange thing is that brackets for 1st field seem to just disappear (see red arrows in image) but not for the next 4 fields. I have found a workaround for this, so I need NOT a solution, merely an explanation why this is happening. The workaround I came up with is to start from a non-empty string. but do you have any idea as WHY this is happening? I have attached a file with both the problem and the workaround.




      Thank you for your time.