Solved

why append fail?

Posted on 2004-04-27
11
220 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
  • 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
 
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
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Suggested Solutions

Lack of Storage capacity is a common problem that exists in every field of life. Here we are taking the case of Lotus Notes Emails, as we all know that we are totally depend on e-communication i.e. Emails. This article is fully dedicated to resolvin…
Notes Document Link used by IBM Notes is a link file which aids in the sharing of links to documents in email and webpages. The posts describe the importance and steps to create a Lotus Notes NDL file in brief.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

707 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