Solved

why append fail?

Posted on 2004-04-27
11
228 Views
Last Modified: 2013-12-18
Hi All,
I tried to append the value of two fields(text and combobox)
to another text field with the following

@SetField("target"; text1 + " " + combo1)

there are no error message while the target text field
still contain empty string. Moreover how can I append
the text of text1 and combo1 to the target text field
rather than overwrite it?
Thanks.
0
Comment
Question by:damoncwk
[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
  • 2
  • +3
11 Comments
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 10931425
FIELD Target := Target : text1 + " " + combo1

~Hemanth
0
 
LVL 15

Accepted Solution

by:
Bozzie4 earned 125 total points
ID: 10931452
The field, target, should be "computed" and the formula should be :

text1+" "+combo1

That's it.

To append, do this (make it multivalue first)

@unique(@trim(@thisvalue:(text1+" "+combo1))

If you use R5, it's :

@unique(@trim(text:(text1+" "+combo1))

However, if it's a computed field, the value will append to itself a lot of times, so you probably only want to do the calculation on document save.  You can then put this formula in the querysave:

FIELD text := @unique(@trim(text:(text1+" "+combo1));
""

OR use this (in the computed field)

@if(@isdocbeingsaved;@unique(@trim(@thisvalue:(text1+" "+combo1));@thisvalue)
0
 
LVL 15

Expert Comment

by:Bozzie4
ID: 10931463
Damn.  I need to type less or faster :-)

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.

 
LVL 63

Expert Comment

by:Zvonko
ID: 10932393
My proposal:

@SetField("target"; target + " " + text1 + " " + @Implode(combo1));

The @Implode is only necessary if your combo1 can have multiple values.


0
 
LVL 13

Expert Comment

by:CRAK
ID: 10932794
Bozzie is right: is it a computed field?
Default values of editable fields only get computed when new doc's are first created. That goed for computed when composed too!

Make sure that no other events write that field and check prior to / after save and/or refresh (F9).
0
 
LVL 31

Expert Comment

by:qwaletee
ID: 10932978
Hi HemanthaKumar,
> FIELD Target := Target : text1 + " " + combo1

I am SURE you meant FIELD Target := Target : (Text1 + " " + combo1)
BUT damoncwk probably intents "append" to mean "concatenate the text as a single string" not "create a text list."  In that case, it should be FIELD Target := Target + " " + text1 + " " + combo1

I assume the question being asked in not "why append fail" -- meaning failure message, but "why do I lose the old value when I append new ones."  If the operation completely fails -- either no change, or result is completely blank, or there is an error message -- then we need more information before we can help.


0
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 10933048
yes.. that was my intention.
0
 

Author Comment

by:damoncwk
ID: 10936621
Hi,
sorry that i am confused where should the FIELD Target := Target : text1 + " " + combo1
be placed.

 
0
 

Author Comment

by:damoncwk
ID: 10936653
when i try to do the following it failed
@Now + " " + combo1

if i make it text1 + " " + combo1 then it did get started
is there any conversion i need to do for the @Now function?

Thanks
0
 
LVL 63

Expert Comment

by:Zvonko
ID: 10936700
@Text(@Now) + " " + combo1

0
 
LVL 63

Expert Comment

by:Zvonko
ID: 10936737
You can define the format of the date and time you want to have for the @Text() conversion.

This formula:
@Text(@Now;"D0S0") + " " + combo1

Yields this text:
28.04.2004 The Option

Here is the date conversion format description:
http://www-12.lotus.com/ldd/doc/domino_notes/6.5.1/help65_designer.nsf/855dc7fcfd5fec9a85256b870069c0ab/80f7f6e0b4159e9685256e000049cd38?OpenDocument



0

Featured Post

Want Experts Exchange at your fingertips?

With Experts Exchange’s latest app release, you can now experience our most recent features, updates, and the same community interface while on-the-go. Download our latest app release at the Android or Apple stores today!

Question has a verified solution.

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

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 article covers general Notes 8.5 troubleshooting information including recreating the Notes\Data folder.
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

617 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