?
Solved

Updating parent field

Posted on 2004-03-26
9
Medium Priority
?
229 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
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!

 
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 200 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

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.
This article covers general Notes 8.5 troubleshooting information including recreating the Notes\Data folder.
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses

743 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