Alignment with Mulit-value fields as rows & columns

I know this has been asked before, I searched the forum and found little. I know I have had this issue before as others, but users are users…

I’m using three multi-value fields to display values as if it’s rows and columns. Looks nice if the strings aren’t too long. But if one value carries down to a new line, it messes the alignment of the three field values, (again… I know this has been asked before).

I don’t want to add a bunch of fields in a table that are only visible when a new row is needed as there might be LOTS of records/values.

Anyone have a good fix? Nothing new here, but I want to ask anyway.

Thanks much

Subject: alignment with Mulit-value fields as rows & columns

Save the multi-value fields data in different form, make a view and embedd the view on your form, single categoried by DOCID…enjoy the liberty of huge data without worrying about formating and display…how is that?

Subject: RE: alignment with Mulit-value fields as rows & columns

Thank you for your reply. That is an option that I will look into.

Thanks!!

Subject: RE: alignment with Mulit-value fields as rows & columns

Most welcome…I am happy for you…keep in touch

Subject: alignment with Mulit-value fields as rows & columns

http://www-10.lotus.com/ldd/bpmpblog.nsf

Look at this blog…

http://www-10.lotus.com/ldd/bpmpblog.nsf/dx/dynamic-table-1

Andre does a great dynamic table in this article…

Subject: RE: alignment with Mulit-value fields as rows & columns

Betsy,

THANKS A MILLIONS!! This is really nice and perfect for what I need.

again, thanks!

Subject: RE: alignment with Mulit-value fields as rows & columns

This works nice, but beware of some issues that might pop up using this …

http://www-1.ibm.com/support/docview.wss?rs=475&context=SSKTWP&q1=computed+rich+text&uid=swg21097112&loc=en_US&cs=utf-8&lang=en

Subject: RE: alignment with Mulit-value fields as rows & columns

I like the response to the blog posting where the responder suggests using a listview control (a datagrid would work too). Obviously it would not work on the web, but for client applications I think it is a great idea.

Subject: alignment with Mulit-value fields as rows & columns

In a nutshell, you must separate storage from presentation. Store your data in structured format in a hidden field, something like this:

^VAL1=xxx~VAL2=yyy~VAL3=zzz^VAL1=…

Upon PostOpen, use Split() to parse that out into a set of data objects, like this:

Class MyData

public val1 as string

public val2 as string

public val3 as string

public function label as string

label = val1+ " " + val2 +" " + val3 ’ or whatever

end function

End class

At the same time store a presentation version of this data in a hidden field, like this:

object1.label():object2.label():object3.label()…

In other words the Label() function handles your alignment for you provided you use a monospace font.

Use that hidden field as the source for a listbox.

Use the OnChange event of the listbox to figure out which “row” the user is selecting, and push that row’s values into a set of fields for editing. When they click on OK or whatever to say they are done editing, locate the corresponding MyData object, set its properties, and re-populate the form.

Subject: don’t forget StrToken…

just to put in my 2 cents…

I agree with everything Thomas has said here, although I like to use StrToken to do split the data. the nice thing about Strtoken is that is the LS equivalent of @Word. If you know where the data is in your delimited text string, you can always use StrToken to accurately retrieve the data you are looking for. I use this technique in almost every database I build. It’s the only way to make dynamic data listed in tables look right, IMO…

brandt