Solved

Min function in formula

Posted on 2004-09-27
15
349 Views
Last Modified: 2013-12-18
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
0
Comment
Question by:AboutLotus
  • 7
  • 6
  • 2
15 Comments
 
LVL 19

Expert Comment

by:madheeswar
ID: 12158930
I think u r talking aboput column formula.

Instead use column Ascending sorting.
0
 

Author Comment

by:AboutLotus
ID: 12158941
Yeah it is a column formula.I tried that but the textlist doesnot gets sorted.what can I do now Madheeswar?
0
 
LVL 19

Expert Comment

by:madheeswar
ID: 12158966
Assume ur field is multi value and text.

In the column formula:

@TextTonumber(@EXplode(yourFieldname;";"))

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)
0
Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

 

Author Comment

by:AboutLotus
ID: 12159060
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?
0
 
LVL 19

Expert Comment

by:madheeswar
ID: 12159068
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).
0
 

Author Comment

by:AboutLotus
ID: 12159079
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.
0
 
LVL 19

Expert Comment

by:madheeswar
ID: 12159091
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 ?
0
 

Author Comment

by:AboutLotus
ID: 12159093
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?
0
 

Author Comment

by:AboutLotus
ID: 12159099
Now in a clumn formula I have to sort a field and then use it in formula., How can I do that?
0
 
LVL 19

Expert Comment

by:madheeswar
ID: 12159107
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.
0
 

Author Comment

by:AboutLotus
ID: 12159132


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?



0
 
LVL 19

Expert Comment

by:madheeswar
ID: 12159158
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.
0
 
LVL 46

Expert Comment

by:Sjef Bosman
ID: 12159686
What's wrong with @Sort? R6 required...
0
 

Author Comment

by:AboutLotus
ID: 12178374
I am using R5.
0
 
LVL 46

Accepted Solution

by:
Sjef Bosman earned 50 total points
ID: 12178644
It cannot be done using @Formula language, there are no looping mechanisms in R5 for that purpose. My suggestion would be to use some sort of sort function in LotusScript in the PostRecalc event in the form, writing the sorted output into a new field. There are many sort-algorithms available on the Internet, so just pick one, or we can supply you one. If you need all existing documents updated, use an agent to calculate the new field.
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For Desktop Techs: How to retain a user's Notes configuration data when swapping out the end user's computer. (Assuming that you are not upgrading to a completely different version of Notes client) All you need to do is: 1) install Notes o…
Problem "Can you help me recover my changes?  I double-clicked the attachment, made changes, and then hit Save before closing it.  But when I try to re-open it, my changes are missing!"    Solution This solution opens the Outlook Secure Temp Fold…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…

815 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now