Hi there,
have to find a solution for the following scenario :
I have a view with a sorted column. This column has the Option "Show multiple values as separate entries" switched on. There is another corresponding Multivalue field and I only want to show from this 2. field those value that fit (index equal) to the sorted column value.
Example:
Field 1 with several dates and field 2 with several text lines. Each text line {i} corresponds to the date line {i}. So in a view sorted by the date field, all dates are shown as separate rows, but all the text lines are always displayed.
Field 1 : 01.01.2023; 05.02.2023; 09.07.2023
Field 2: "Event A"; "Event B"; Event C"
So the first date "01.01.2023" (index 0) coresponds to "Event A" (index0) and so forth and it only want to see in every line produced in the view the 1 coresponding value with the same index
My questions:
1. Is it possible to get programatically in the view the one value of the multiple value field that is currently displayed in the row?
2. Is there any way to know which index of this field is used in the current row ?
If 1. would be exist I could use @Member to determine the index programatically, if there are only unique values in that multivalue field.
Any ideas or hints ?
Sincerly, Jochen "Joe" Herrmann
Problem solved !!! Updates
Found this in the Documentation and ... it works:
CAUTION:
If you set this option on a column that displays a multivalue list, but you do not specify a sort order for the column, Domino® Designer displays only the first value in the list. Once you have one sorted separate entries column, you can create additional separate entries columns that are not sorted. If the multivalue columns contain the same number of entries, the corresponding entries will show together in one row. For example, if column 1 (sorted) contains values "A" and "B", and column 2 (not sorted) contains "Apple" and "Balloon", then in the view you will see one row containing "A" and "Apple", and another row containing "B" and "Balloon". If column 2 were also sorted, you would see all the combinations of a value from column 1 and a value from column 2. They do not need to contain the same number of entries. In this example, the document would appear on four rows: "A Apple", "A Balloon", "B Apple", "B Balloon". This is sometimes useful, but if you do it with too many columns it can have a serious performance impact on your application.
Addendum:
Not solved !
Unfortunately this solutions has several side effects which makes it almost ununsable. The worst one is that if one changes something in only 1 document in one of those 2 fields and saves it, the view changes to a long list of "● Replication conflict" , nothign else than these entries. Refreshing the view does not help.
The second problem is, that if one of the documents in the view has only 1 entry in each of those 2 fields (multivalue with only one value) , this document is displayed correctly, but then all the other documents with multiple values in the 2. field is displayed again with all its values and not only one. As the 1. problem is already a killer criteria for this design approach, I stopped investigating at this point.
But I ask again:
Is there a way to programmatically determine in @formula the display index for a multivalue field used as a key in a view with the option "Show multiple values as separate entries" switched on ?
Update: A "Recompile All" solved the both problems !!!
Sincerly
Jochen "Joe" Herrmann