Why is my field still blank after trying to inherit a value from another field?

Hi,

Can anyone point out why my SWUser field is blank?

I have 2 forms. The first form has a field SWUser [Names/Computed] where I can choose a user to email too using a simple formula

FIELD SWUser:=SWUser;

@SetField(“SWUser”; @PickList(( [Name] )));

The changes are then saved and so everytime this form is preview it shows the same user over and over which is what I want. On the second form I have added a field SWUser [Text/Computed when composed] and have tried to reference it by showing the user from the SWUser field on form 1. I have done this by putting “SWUser” in the default value but the field remains blank!!

The Forms inherit from selected documents option has also been selected.

This is my send email code adapted from someone elses code: -

if Trim(uidoc.FieldGetText(“SWUser”)) <> “” then

emailmsg.sendTo = uidoc.FieldGetText(“SWUser”)

emailmsg.subject = “FYI: Order Notification”

Set bodyRTF = emailMsg.CreateRichTextItem(“Body”)

Call bodyRTF.AddNewline(1)

Call bodyRTF.AppendText(“Hi,”)

Call bodyRTF.AddNewline(2)

Call bodyRTF.AppendText(“Your order enquiry has been submitted.”)

Call bodyRTF.AddNewline(2)

Call bodyRTF.AppendText(“This will be looked into within the next 24hrs”)

Call bodyRTF.AddNewline(2)

Call bodyRTF.AppendDocLink(uidoc.Document, “Please follow the link to view your order that you submitted”)

Call uidoc.save

Call emailMsg.Send(False)

Else

MsgBox(“SWUser is blank cannot send mail.”)

End if

Thanks a lot

Subject: Why is my field still blank after trying to inherit a value from another field???

Dont put “SWUser” it is a constant not a field value…try putting SWuser and make sure the second form is opened with reference to a saved document i.e.1. Either from a button or something present on the main form. (make sure the main document is saved before creating an inherit doc)

  1. From a view action, (the main document needs to be selected in this case)

Subject: RE: Why is my field still blank after trying to inherit a value from another field???

Thanks - it works now.

Just wondering though…

Does there have to be a action button on the form 1 to open form 2 in order to inherit these values as I have a frameset that has 2 outlines.

First outline is the maintenance section and the other is where the users can make orders and do stuff. Form 1 is on the maintenace side and this therefore doesnt get changed as frequently. Its only there if the approvers in the SWUser field need changing or updating, which is done via a picklist option.

Form 2 is on the create orders side (which is the side the users will be using the most rather than the maintenance side) so ideally I would just like it so that when they select the link to open up the create order form for the fields to inherit from form 1 to the fields on form 2 without the user having to go to form 1 and clicking on an action button to open form 2.

Does that make sense?

If this is the only way then no matter - thanks for your help.