Solved

Updating parent field

Posted on 2004-03-26
9
227 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
[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
  • 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
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 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
 
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

Enroll in May's Course of the Month

May’s Course of the Month is now available! Experts Exchange’s Premium Members and Team Accounts have access to a complimentary course each month as part of their membership—an extra way to increase training and boost professional development.

Question has a verified solution.

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

Suggested Solutions

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
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.

737 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