In my table I have essentially 2 columns (many more but there is an obvious left side and right side). One of the fields, FIELD1, on the left side comes from a LookupSet() and each ID can have two items from FIELD1. Using a join(lookupset(), vbcrlf) I am able to get both values for the ID and put it into one cell in the table. This works but with the vbcrlf, the row height is increased. This causes a problem because there is data on the right side which cannot have additional space between it.
I did a split(join(lookupset())).getValue(0) for the first row and then the row below it for value 1. With some iif statements to check errors etc, this works.
One problem I solved is that the values for FIELD1 can be longer than the width of the cell, but will not take up more than two. I was able to do some substring magic in oracle like:
SELECT ID, SUBSTR(FIELD1, 1, 70) FROM....
UNION
SELECT ID, SUBSTR(FIELD1, 70) FROM ...
using sorting, I am able to get up to 4 rows of data per ID which I will be able to split the lookupset and get each value into the table.
My last problem, and hopefully someone can help with is that when I ge the substring, It can cut off words and the next row will start with the rest of the word.
Is there a way, possibly using a regex to make sure to keep words in tact, but also to ensure that the total length returned is < some number of characters? I am happy to abandon any part of the approach i am currently taking if I am off track.
I was able to solve this (with some help) by using
SUBSTR(FIELD1,1, regexp_instr(FIELD1, ‘[ ]’, 70))