Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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.

share|improve this question
    
The code behind language is C#. –  Mayer M Jul 10 '12 at 20:47

1 Answer 1

up vote 1 down vote accepted

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

share|improve this answer
    
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 '12 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! –  PurpleShadow Jul 11 '12 at 14:28
    
This is the link to his blog post. HTH! –  PurpleShadow Jul 11 '12 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 '12 at 15:08

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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