Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

How do I combine several fields into one field arranging the data alphabetically?

Posted on 2005-04-26
7
Medium Priority
?
289 Views
Last Modified: 2013-12-18
Good morning everyone. I have created a form in Lotus Domino Designer that has several fields I would like to combine into one field during Opened for Reading Mode. In Edit Mode the fields look like this:

Field 1 = Clear Beans
Field 2 = Blue Beans
Field 3 = Green Beans
Field 4 = Select another brand...
Field 5 = Select another brand...

As you can see the user can select however many brands are carried at a particular store. I would like to combine the data into one field in alphabetical order when the form is in Opned for Reading Mode, excluding any "Select another brand..." choices.

Field 6 = Blue Beans, Clear Beans, Green Beans

How can I do this?
0
Comment
Question by:GCortesJr
  • 4
  • 2
6 Comments
 
LVL 9

Expert Comment

by:HappyFunBall
ID: 13867485
Make field 6 a computed field (or use the Computed Text option).

For the value of the field, put this formula:

myList := Field1:Field2:Field3:Field4:Field5;
myTrimmedList := @Trim(@Replace(myList; "Select another brand..."; ""));
@Sort(myTrimmedList; [ASCENDING]);

I'm assuming you're using R6, otherwise the @Sort formula will generate an error.  The first line builds a list based on the values of your 5 fields.  The 2nd line uses the @Replace function to turn any "Select another brand" values of that list into "" empty strings.  The @Trim function then removes any empty string list items from the list and essentially leaves you with just the values "Clear Beans", "Blue Beans", "Green Beans".  Finally @Sort takes everything and sorts in ascending order.

BTW, what are Blue Beans anyway?  Sounds like Green eggs and ham.
0
 
LVL 9

Expert Comment

by:HappyFunBall
ID: 13867489
Forgot to add that this question should be posted in the Lotus Notes/Domino formum, not the Lotus Smart Suite forum.
0
 

Author Comment

by:GCortesJr
ID: 13868279
LOL, they are just died beans. Nothing special.  have to make a slight change to my request. The fields that I am getting data from to combine have been changed to Checkbox fields. So when I put in just the first line of your formula, I just get a zero back. What am I doing wrong?
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 9

Expert Comment

by:HappyFunBall
ID: 13868734
What are the values of the checkbox fields?  In the 2nd tab of the field properties you can specify what the value(s) of the fields are.  Sometimes they are just one word or phrase, which is what the field gets set to when it is checked.  Other times it'll look like this:  "Blue Beans | 1", which means that Blue Beans displays in the client and "1" gets stored as the value of the field.
0
 

Author Comment

by:GCortesJr
ID: 13869974
The value is just one word/phrase per field
0
 
LVL 9

Accepted Solution

by:
HappyFunBall earned 500 total points
ID: 13870457
Hmm...I just reread your 2nd posting.  Did you say you only put in the 1st line of the code?  That first line won't return anything.  It's simply an assigment.  You'd need to put this to test the first line (the 2nd myList returns the list):

myList := Field1:Field2:Field3:Field4:Field5; myList;
0

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

Question has a verified solution.

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

IBM Notes offer Encryption feature using which the user can secure its NSF emails or entire database easily. In this section we will discuss about the process to Encrypt Incoming and Outgoing Mails in depth.
Article by: Rob
Notes 8.5 Archiving Steps and Tips This article covers setting up a Notes archive, and helps understand some of the menu choices making setting up and maintaining a Notes archive file easier.
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Suggested Courses

810 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