locked
Auto pupoluate a text box based on the previous selection of another text box RRS feed

  • Question

  • I'm trying to populate a text box with the previous selection of another text box in a list with a workflow.

    1. Say if I have a choice box with a selection of Red, Green, and Yellow.

    2. I select Red from the option botton and hit submit.

    3. The next time I change that text box to Yellow, the text box in the same list should be populated with the word "Red" automatically upon the change of the first option field. 

    4. I'm thinking this can be done with a workflow and variable, but just can't get it exactly right.

    Thanks,

    Mike


    Michael L. Williams

    Thursday, December 6, 2012 4:21 PM

Answers

  • Take a look at the following article. I find it very useful.

    http://blogs.msdn.com/b/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx


    Pman
    http://www.pmansLab.com/

    Saturday, December 8, 2012 1:49 AM

All replies

  • Does it have to be a text field? In step #3, will the text box need to do populate the value ONLY when you change the value (even before saving the list item)? If not you could create a calculated column instead that'll just take the value of that choice-box field. The value in that column will only be calculated once you save/change an item in the list.

    Or, you could use javascript in the edit form. You'll need 2 functions. One that keeps the existing value in a variable when the page loads. And the second one will do what you want it to do when changing the value in choice box fields.


    Pman
    http://www.pmansLab.com/

    Friday, December 7, 2012 2:00 AM
  • It has to be a option button or text field.

    Previous Color               Current Color - Option button

                                          Green        <------------

    Green                              Red

    Red                                Yellow

    Yellow                            Purple

    Purple                             Blue


    Michael L. Williams

    Friday, December 7, 2012 5:02 AM
  • Can you give me an example of Javascript I will need to use?

    Michael L. Williams

    Friday, December 7, 2012 5:04 AM
  • Take a look at the following article. I find it very useful.

    http://blogs.msdn.com/b/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx


    Pman
    http://www.pmansLab.com/

    Saturday, December 8, 2012 1:49 AM