Solved

Updating parent field

Posted on 2004-03-26
9
222 Views
Last Modified: 2013-12-18
I cannot seen to make this work today. I have used this but....
I need to update a field in the parent and the lotus script code is located in the Postsave of the child
Dim parentcomposed As String
Dim composed As String
parentcomposed = parentdoc.FieldGetText(fld_ECN_seqnum)
composed = source.FieldGetText( "RFC_seqnum")
If  composed <> ""  Then
 Messagebox composed
 parentcomposed = parentdoc.FieldSetText(fld_ECN_seqnum) --- This part does not work
End If      
      
0
Comment
Question by:cyle
  • 3
  • 3
  • 2
  • +1
9 Comments
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 10689306
I am not sure what you are trying here..

FIELDSetText method syntax

FIeldSetText( FieldName, textvalue)

~Hemanth
0
 

Author Comment

by:cyle
ID: 10689316
Error is Object variable not set.
0
 

Author Comment

by:cyle
ID: 10689396
I have parent and a response child now when I save I generate a number in the child. Now this number needs to be sent to the parent.
0
 
LVL 15

Expert Comment

by:Bozzie4
ID: 10689455
Parentdoc is a notesdocument, so you must use backend methods, and fieldsettext is not a backend method.

Dim parentcomposed As String
Dim composed As String
parentcomposed = parentdoc.fld_ECN_seqnum(0)
composed = source.FieldGetText( "RFC_seqnum")
If  composed <> ""  Then
 Messagebox composed
 parentcomposed = parentdoc.fld_ECN_seqnum(0)
End If    

This doesn't update the parent document btw - this only loads a value from the parent.  If you want to update the parent document, you must do something like this

parentdoc.FieldToUpdate = "newvalue"
Call parentdoc.save( true, true )

cheers,

Tom
0
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 
LVL 31

Expert Comment

by:qwaletee
ID: 10689457
How are you assigning parentDoc?

Are you checking that it is in edit mode?
0
 
LVL 31

Expert Comment

by:qwaletee
ID: 10689470
Bozzie is sort of correct... but if that were the case, you would see failure in the FieldGettext line, and you only indicated failure in the FieldSettext line.  That's why I was inclined to think it might be a read/edit mode issue.
0
 
LVL 24

Accepted Solution

by:
HemanthaKumar earned 50 total points
ID: 10689531
You can use @formula to do that

@SetDocField( $Ref; "fld_ECN_SeqNum" ; RFC_SeqNum)
0
 

Author Comment

by:cyle
ID: 10689681
In the Postsave?
0
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 10689935
Yes.. you can
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

For Desktop Techs: How to retain a user's Notes configuration data when swapping out the end user's computer. (Assuming that you are not upgrading to a completely different version of Notes client) All you need to do is: 1) install Notes o…
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
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

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