InputField[Dynamic[X1], Number, Alignment -> Center];
InputField[Dynamic[X2], Number, Alignment -> Center];
Slider[Dynamic[Y1], {0, 200, 1}];
Slider[Dynamic[Y2], {0, 200, 1}];
Dynamic[FK, Dynamic[X1*(1 + Y1/100)]];
Dynamic[MK, Dynamic[X2*(1 + Y2/100)]];
Dynamic[HK, Dynamic[FK + MK]];
HeadTest = NumberQ[#] & /@ {X1, X2, Y1, Y2, FK, MK, HK}


Why would FK,MK and HK not have the head Number? (I guess I just did not understand how to use Dynamic and DynamicModule.)

• You do not need to create a pure function (# &) to Map (/@) an existing one: NumberQ[#] & /@ is not needed, NumberQ /@ will suffice. Commented Aug 17, 2012 at 10:33
• Related: (1864), (2972), (5817) Commented Sep 2, 2013 at 7:21

For any beginner these are a must:

Because for your code as it is right now, with no additional definitions, those variables are symbols - you did not define them numerically (Dynamic got nothing to do with it).

X1 // Head


Symbol

Now if you do this you'll get your 'Number':

{X1, X2, Y1, Y2, FK, MK, HK} = Range[7];
InputField[Dynamic[X1], Number, Alignment -> Center];
InputField[Dynamic[X2], Number, Alignment -> Center];
Slider[Dynamic[Y1], {0, 200, 1}];
Slider[Dynamic[Y2], {0, 200, 1}];
Dynamic[FK, Dynamic[X1*(1 + Y1/100)]];
Dynamic[MK, Dynamic[X2*(1 + Y2/100)]];
Dynamic[HK, Dynamic[FK + MK]];
HeadTest = NumberQ[#] & /@ {X1, X2, Y1, Y2, FK, MK, HK}


{True, True, True, True, True, True, True}

I am not sure what you trying to get, but generally the price of dynamic updating is change of Head. Maybe this example will help to understand - turn your attention to what changes, what evaluates and what does not:

{Slider[Dynamic[x]], Dynamic[x], x, Dynamic[x] // Head, x // Head,
Sin[x], Sin[Dynamic@x], Dynamic@Sin[x]}


• "...generally the price of dynamic updating is change of Head." Great insight into and explanation for how to think about dynamic updating. +1 Commented Aug 17, 2012 at 12:56
• Vitaliy, thanks for identifying the duplicate. Please vote to close the new question as such. Commented Sep 2, 2013 at 7:14
• Vitaliy, we get this question often enough that I believe it needs to be added to the pitfalls post. You have the best reviewed answers here on the subject. Would you be willing to write one? If you do please also include whatever part of John Fultz's answer seem appropriate, with attribution. If you do not wish to do this I will try my best. Commented Sep 2, 2013 at 7:26
• @Mr.Wizard I would appreciate if you could write this. And yes John's answer of course is super. Commented Sep 2, 2013 at 7:30
• Okay, I'll try. When you see it come up (perhaps not tonight) please review and correct it as needed. Commented Sep 2, 2013 at 7:31