We help IT Professionals succeed at work.

Check out our new AWS podcast with Certified Expert, Phil Phillips! Listen to "How to Execute a Seamless AWS Migration" on EE or on your favorite podcast platform. Listen Now

x

Personalised field.

apparition
apparition asked
on
Medium Priority
219 Views
Last Modified: 2013-12-18
In my notes app I'm sending a document as an attachment to a bunch of users. In the document
I have a field called "TO" which should have the name of the person that recieved the email.
I do I code this field so that when a person recieves the document the Field "TO" contains their name.
Comment
Watch Question

So what is the problem here ?

Simply make it a computed field , with @UserName as the default value formula

~Hemanth

Author

Commented:
I did but it does not show the user's name...It shows the senders name.
Do you include this form while sending the mail ?

Can you give more details on how you are sending this mail.. If you can store the form with mail then you can see that field computing by itself when he/she opens.

Commented:
Create a computed when composed field name and give @username as the default value

Partha

Author

Commented:
Nope does not work

Author

Commented:
I'm send the mail using a simple action.
the action takes the values from a text box and sends the mail
to the users specified in the text box.

Author

Commented:
ok this is what I think I need to do

Author

Commented:
ok this is what I think I need to do

Read the users name from the text box
and go through a loop for each user
For each user name in the text box
Change the TO field
Send Email.

The user names are sperated by ";" How would I be able to accomplish this loop code?

Commented:
I am not sure what u are trying to accomplish, but to loop thru a field of names separated by ";" u can use forall.
Forall x in <yourfieldname>
msgbox x
end forall

Partha

Author

Commented:
in formula language please?

Commented:
there are no looping mechanism in formulas uptil R5, but u can always use

@explode(<yourfieldname>;";"), this will give u the list of all the names


Partha

Author

Commented:
how do I retrieve the list?

Author

Commented:
how Would I go thru the list ?

Commented:
Can u paste your current formula

Partha

Author

Commented:
This is what I'm doing I'm getting a type mismatch error
Sub Click(Source As Button)
      Dim workspace As New NotesUIWorkspace
      Dim uidoc As NotesUIDocument
      Dim composed As String
      Set uidoc = workspace.CurrentDocument
      Users = uidoc.FieldGetText( "Users" )
      
      
      Forall x In Users
            Msgbox x
      End Forall
      
End Sub
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION

Author

Commented:
This what I want to do

Sub Click(Source As Button)
     Dim workspace As New NotesUIWorkspace
     Dim uidoc As NotesUIDocument
     Dim composed As String
     Set uidoc = workspace.CurrentDocument
     Users = uidoc.FieldGetText( "Users" )
     
     
     Forall x In Users
          Set a field "TO"
          Send the document as an email to the person in TO field
     End Forall
     
End Sub

Author

Commented:
whats the code to Send the document as an email to the person in the TO field

Author

Commented:
The Loop worked

Commented:
what is that "To" needs to be set, it has to be set to the value in Users

if htat is teh case


Forall x in users
doc.to = x
doc.sendto = x
end forall

Author

Commented:
I just used
Call doc.Send( True, x)

It works but theres one last problem. Sorry.
But for some reason when I open the email from my notes client the
User set headers Don't show. Is theres parameter I'm forgetting to set?

Commented:
can u be little clear, what do u mean by "user set headers don't show"

Partha
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.