2

I'm new in Sharepoint, and I have an issue with a custom list in Sharepoint 2007.

The thing is... I have a custom list with pre-loaded data, and I need to get a unique code from a field item, to put it on other field from the same item.

I will put two items as an example of the custom list.

Some fields are:

ID *   Name  * User Code *   URL   *
************************************
 1 * John    *    u121   * Clickme *
************************************
 2 * Natalie *    u412   * Clickme * 
************************************

With "Click me" as a url reference to

../myWebPage.aspx?userCode=

What I want is to get the code value from the field and put it on the URL field (both from the same item).
For example: I want to John's url to be like this :

../myWebPage.aspx?userCode=u121

The same thing I want with natalie, but with her own code.

I can't change the data view into a XSLT (it breaks other stuff) and I can't use JQuery.

If you could help me using JavaScript, it would be great, but if you think there's an easy way to do this, feel free to comment.

Thank you for your consideration of this matter.

1
  • The code behind language is C#.
    – Mayer M
    Jul 10, 2012 at 20:47

1 Answer 1

1

Use a calculated column. You can use the CONCATENATE function.

=CONCATENATE("www.xyz.com?userCode=",[Code]).

You will get the result like this Calculated URL

4
  • Thanks a lot! It's not the exact thing I need, but it's close... I want something like this -> click me
    – Mayer M
    Jul 10, 2012 at 20:34
  • You might check Christophe's pathtosharepoint site for help with the URL modification. You will need to add his JS to a CEWP in your site and you can modify the calculated column to accept HTML tags. It worked for me! Jul 11, 2012 at 14:28
  • This is the link to his blog post. HTH! Jul 11, 2012 at 14:32
  • THANK YOU SO MUCH!!! I've been like a month with this issue! Tried several things, but never reached to this. Thank you :)
    – Mayer M
    Jul 13, 2012 at 15:08

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.