Solved

Why is my text moving to a new line when I enter a space in this field in a Notes Database form?

Posted on 2008-06-18
6
315 Views
Last Modified: 2013-12-18
We have serveral databases experiencing the same issue.  I originally thought it was due to a change in part numbers in which they now contain a space but not sure.  The forms have an "Add Part" button. When we use a space in the part number it wraps to the next line.  The Field is Text, Computed for Display, Allow multiple records, Separate records when user enters Comma, Semicolon and New Line, Display separate Values with New Line. If I use dashes in the part number it works fine.  This isn't my area of expertise.  Not sure if the @Explode and @Implode are part of the issue.  

Here is the code:
@All;
tPartNum := @Prompt([OkCancelEdit]; "Part being returned"; "Enter Part Number"; "");
tPrompt1 := "How many "+ tPartNum + " were shipped?";
tPartsShip := @Prompt([OkCancelEdit]; "Part being returned"; tPrompt1; "");
tPrompt2 := "How many "+ tPartNum+ " are being returned?";
tAdvQty := @Prompt([OkCancelEdit]; "Part being returned"; tPrompt2; "");
tPrompt3 := "At what price were "+ tPartNum+ " sold?";
tUnitPrice := @Prompt([OkCancelEdit]; "Part being returned"; tPrompt3; "");
FIELD PartNum := @If(PartNum = NULL; tPartNum; @Explode(@Implode(PartNum)+@NewLine+tPartNum));
FIELD PartsShip := @If(PartsShip = NULL; tPartsShip; @Explode(@Implode(PartsShip)+@NewLine+tPartsShip));
FIELD AdvQty := @If(AdvQty = NULL; tAdvQty; @Explode(@Implode(AdvQty)+@NewLine+tAdvQty));
FIELD UnitPrice := @If(UnitPrice = NULL; tUnitPrice; @Explode(@Implode(UnitPrice)+@NewLine+tUnitPrice));
@Command([ViewRefreshFields]);
FIELD Restock := SubTot * 0.2;
@Command([ViewRefreshFields])

0
Comment
Question by:mail03lady
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 17

Expert Comment

by:fgrushevsky
ID: 21815802
You are correct - @explode seems to be the issue.
From Help:

@Explode( string ; separators )

string
Text. The string that you want to make into a text list.
separators
Text. Optional. One or more characters that define the end of an element in string. The default separators are " ,;" (space, comma, semicolon), which means that Lotus Domino adds a new element to the text list each time a space, comma, or semicolon occurs in the original string.

So when @explode "sees" space, it uses it to separate list entries, and then "Display separate entries with New Line" moves text to another string
0
 
LVL 17

Expert Comment

by:fgrushevsky
ID: 21815828
use @explode(@Implode(PartsShip)+@NewLine+tPartsShip;",;") if coma and semicolon are you separators
0
 

Author Comment

by:mail03lady
ID: 21816526
We got it to work partially using FIELD PartNum := @If(PartNum = NULL; tPartNum; PartNum+@NewLine+tPartNum); which works for the first and second time we use the Add button.  The third time it list:
Item 1
Item 3
Item 2
Item 3
Now we need to figure out how to handle more than two items.
0
[Live Webinar] The Cloud Skills Gap

As Cloud technologies come of age, business leaders grapple with the impact it has on their team's skills and the gap associated with the use of a cloud platform.

Join experts from 451 Research and Concerto Cloud Services on July 27th where we will examine fact and fiction.

 

Author Comment

by:mail03lady
ID: 21824437
Thanks for your comments:  We think we have a resolution.  We changed the line: FIELD PartNum := @If(PartNum = NULL; tPartNum; @Explode(@Implode(PartNum)+@NewLine+tPartNum));

To:  FIELD PartNum := @If(PartNum = NULL; tPartNum; @Explode(@Implode(PartNum;@NewLine)+@NewLine+tPartNum;@NewLine));
0
 
LVL 46

Accepted Solution

by:
Sjef Bosman earned 500 total points
ID: 21832283
I could be mistaken, but you've got some might strange coding there... It seems like the original developer didn't know his Formula language.

This piece of code seems rather silly to me:
   @Explode(@Implode(PartNum)+@NewLine+tPartNum)

Could you try to replace it by:
   Partnum:tPartNum

The colon is the operator in Formula language to concatenate lists and elements into lists.
0
 

Author Closing Comment

by:mail03lady
ID: 31468506
Streamlined our solution
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

This is an old article, please see an updated version of this article, located here: http://www.experts-exchange.com/articles/23619/Notes-8-5x-Windows-7-Notes-info-and-tips.html
For beginners of Lotus Notes user this is important to know about the types of files and their location supported by IBM Notes. Mostly users are unaware about how many file types are created and what their usages are. This Article is fully dedicated…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Suggested Courses

623 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