Solved

why append fail?

Posted on 2004-04-27
11
225 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
Independent Software Vendors: 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 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

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!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Creating a bat file fo Note.ini 4 234
Lotus Notes 41 221
Lotes Notes 8.5.3 std can not open calendar 2 119
Lotus Notes want to capture date/time FIRST time a field changes status 7 77
You’ve got a lotus Domino web server, and you have been told that “leverage browser caching” is a must do. This means that we have to tell the browser everywhere in the web to use cache. In other words, we set (and send) an expiration date in the HT…
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.
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

735 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