I am trying to work out a way to personalize emails whereby I utilize the "Full Name" field but parse the data after the first space. I am having issues with my AMPScript for this block:
%%[ SET @FullName = [First Name] SET @WhiteSpacePos = IndexOf(@FullName, ' ') SET @FirstNamePos = Add(@WhiteSpacePos, 1) SET @FirstName = Substring(@FullName, 1, @FirstNamePos) ]%%
After doing this, it brings up the values; however, it's 90% perfect. The issue is that the first initial of the second name comes up, e.g., "Sam Smith" comes out "Sam S"
The other issue is that in places where there is just one name. In this case, for example, "Sam" comes out simply just "S".
Any ideas on how to work around these?