Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have 4 InputFields.I want to find which InputField was recently Updated out of all InputFields.For that purpose I wrote the following code.

 fValues = {Null, Null, Null, Null};
        {i = i},
                            Dynamic[Part[fValues, i]],
                            ContinuousAction -> True
    {i, 1, 4}

How can I resolve this?

Can anyone help me?

Thank you

share|improve this question
Could you please tell us why do you keep using so much whitespace with your code formatting? I am simply curious. – István Zachar May 2 '13 at 11:24
@IstvánZachar For my code maintenance and understanding purpose,every time I following indentation Styels. – subbu May 2 '13 at 11:42
up vote 2 down vote accepted

You can use the second argument to Dynamic:

DynamicModule[{fValues, msg, processChanges},
 fValues = {Null, Null, Null, Null};
 msg = "No change yet";
 processChanges[field_, oldvalue_, newvalue_] := 
  msg = Row[{field, " was changed from ", oldvalue, " to ", newvalue}];

 {Table[With[{i = i}, (InputField[
      Dynamic[Part[fValues, i], processChanges[i, fValues[[i]], fValues[[i]] = #] &],
      Number, ContinuousAction -> True])], {i, 1, 4}],
share|improve this answer

Your Answer


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.