AboutLotus
asked on
Min function in formula
In a view formula field I have to order a text list from min to max value. I want it to be done with min function. The textlist contains 25 elements. I have tried like this
strUnique:= @unique(volume);
REM "initialize the minimum as the first of the unique volumes";
strMinVolume := @subset(strUnique;1);
REM "now take the minimum of the first and second elements of the unique volumes";
strMinVolume1 := @min(strMinVolume; @subset(@subset(strUnique; 2);-1));
REM "now take the minimum of the previous minimum and the third element of the unique volumes";
strMinVolume2= @min(strMinVolume1; @subset(@subset(strUnique; 3);-1));
but I am not able to proceed further. I want the ordered list to be in an array. How can I do that?
Thanks in Advance
AL
strUnique:= @unique(volume);
REM "initialize the minimum as the first of the unique volumes";
strMinVolume := @subset(strUnique;1);
REM "now take the minimum of the first and second elements of the unique volumes";
strMinVolume1 := @min(strMinVolume; @subset(@subset(strUnique;
REM "now take the minimum of the previous minimum and the third element of the unique volumes";
strMinVolume2= @min(strMinVolume1; @subset(@subset(strUnique;
but I am not able to proceed further. I want the ordered list to be in an array. How can I do that?
Thanks in Advance
AL
ASKER
Yeah it is a column formula.I tried that but the textlist doesnot gets sorted.what can I do now Madheeswar?
Assume ur field is multi value and text.
In the column formula:
@TextTonumber(@EXplode(you rFieldname ;";"))
and in the column properties:
Sorted: Ascending
And in the view properties:
Make it per row as 9
And u can show max: 9 entries in a column(I mean in a row for a doc)
In the column formula:
@TextTonumber(@EXplode(you
and in the column properties:
Sorted: Ascending
And in the view properties:
Make it per row as 9
And u can show max: 9 entries in a column(I mean in a row for a doc)
ASKER
I have tried that too but this works only when the multiple entries are shown as seperate entires. But I am not supposed to do that.when I tried to do without this then it is not in an ordered manner. What can I do?
I did not got it.
U have multivalue text field. And u want to sort in Ascending. Right?
Then follow my method. And in the column properties, enable Show multivalue as separate entries(new Line).
U have multivalue text field. And u want to sort in Ascending. Right?
Then follow my method. And in the column properties, enable Show multivalue as separate entries(new Line).
ASKER
Another problem is I dont want to show this field in the view as column rather use this text list in another column formula in the same view.
I think ur in a mixed state. U said to display the result in Ascending.
And now u want to use it in another column(U can't use the results of one Column in another column). So, ur totally in a wrong assumption or ur newbie to NOTES.
what u want to achieve ?
And now u want to use it in another column(U can't use the results of one Column in another column). So, ur totally in a wrong assumption or ur newbie to NOTES.
what u want to achieve ?
ASKER
I have tried like this I have created a coloumn which is hidden and I have sorted it in ascending and shown as multiple entries. but even If I use this sorted coulmn in another column's formula the result is assorted. ( but the constraint is the value should be sorted before used in the formula).What would be the solution?
ASKER
Now in a clumn formula I have to sort a field and then use it in formula., How can I do that?
can show some example ?
Type in a view format and tell me how u want.
Sorry, I did not understood. I don't want to take my own assumptions. I want to know exactly u want for better solution.
Type in a view format and tell me how u want.
Sorry, I did not understood. I don't want to take my own assumptions. I want to know exactly u want for better solution.
ASKER
name marks
sre 25,37,69,83
fri 42,86,92,99
This should be the final view. The values used in marks are from a field called mk which is a text list with values as 0,20,84,35,67 and 88,76,36,89 so Now In the marks column formula I will have to sort the mk field first and then use the sorted list in the formula for display.
Is this ok?
As per I undertood,
U want to display Marks in sorted. RIGHT? (U want it in next line or in a asme line as u shown sample?)
Below is to display in new line
Forget about another column.
U have first column as Name.
Second column: marks (Sorted in Ascending)
and in the Column formula:
@textToNumber(@Explode(mk; ";"))
or try:
@textToNumber(@Explode(mk; ","))
And how ur updating mk field ? I think users are entering values as text only. So, I suppose this won't be a multivalue.
And as per displaying in a single line, it is very difficult to achieve.
U want to display Marks in sorted. RIGHT? (U want it in next line or in a asme line as u shown sample?)
Below is to display in new line
Forget about another column.
U have first column as Name.
Second column: marks (Sorted in Ascending)
and in the Column formula:
@textToNumber(@Explode(mk;
or try:
@textToNumber(@Explode(mk;
And how ur updating mk field ? I think users are entering values as text only. So, I suppose this won't be a multivalue.
And as per displaying in a single line, it is very difficult to achieve.
What's wrong with @Sort? R6 required...
ASKER
I am using R5.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Instead use column Ascending sorting.