Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

getting first record in a concatenating string

Hi

I have the formula for my string but unfortunately it does not display the first record.

Can someone suggset me what should be done::

StringVar x;

if previousIsNull({Query1.1}) or ({Query1.1} <> previous({Query1.1}) ) then

x := {Query1.2}

else

x := x + "," + {Query1.2};

x

Thanks

Robinn

Former Member
Former Member replied

Hmm, not sure, but perhaps you need to evaluate OnFirstRecord instead of/in addition to the PreviousIsNull (they probably aren't the same)?

If that's of no use, throw us some sample data and expected output and we'll see what we can do...

StringVar x;
if onFirstRecord = true or previousIsNull({Query1.1}) or ({Query1.1} previous({Query1.1}) ) then
x := {Query1.2}
else
x := x + "," + {Query1.2};
x

Edited by: Jaime Hargreaves on May 6, 2009 12:47 PM - Added a code snippet

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question