0

So I'm having quite a big problem here. I'm trying to create one form for one user to fill out, as soon as the form is finished, copy that data to a second form, email the user specified in the first form and allow them to continue editing the second form. Basically an on-boarding system for our employees.

The problem I'm having is that the system keeps adding formatting whenever I copy something over. I'm trying to make the form idiot proof, so I created a drop down and filtered it to all the emails in the company. However, when it copied the email over to the second list it would add some data at the beginning, for example. "[email protected]" became "12;#[email protected]" or something along those lines which, of course, fails in sending the email properly.

I tried changing this to a name lookup that would then become an email lookup based upon that name, but it's the same problem, it adds a number, semi-colon, and ampersand to the name when I copy it from a drop down, which, again, fails in creating a proper lookup for the email address.

I've tried doing an extract substring from text, but that relies on knowing exactly where to extract and the number can be one digit or two making that useless.

How can I go about using a drop down that looks to a lookup on our Sharepoint site and have that copy over without it pulling over more data that messes up the workflow.

3
  • Is the first email field a lookup column? If so, I think what you are getting is both the list item id and value from the first lookup column. Data in lookup columns are actually stored as id;#value. Having the ID stored in the field allows SharePoint to maintain the relationship back to the original. Now of course, that doesn't help you right now because it's mucking your forms up. Is it possible to use a people picker field instead? Then you could do an email lookup from the user selected.
    – Todd
    Jun 14, 2016 at 21:38
  • Looks like creating a people picker fixed the issue! Thanks so much!
    – Gerald
    Jun 15, 2016 at 20:09
  • Why copy items to another form? Use the newform when the first user creates the item, and use the editform when the second user to finish filling in the rest of the info. Also, lookup fields are stored as <item id>;#<item value>. This can easily be parsed, as it will always follow that format.
    – wjervis
    Jun 16, 2016 at 18:48

1 Answer 1

0

Posting as an answer... Use a people field in stead of a lookup field. You can then retrieve the email address from the user indicated.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.