# InputField with a symbol’s name [duplicate]

Suppose I have an InputField of type String wherein I want to enter a symbol name that I want a later Button to assign values to. That button would then do something like:

Evaluate[ToSymbol[string]]=stuff


But if the symbol name that is entered already has been assigned a value, this fails because the left-hand-side becomes the value, to which it is not valid to assign a new value. How do I convert the string to a symbol without evaluating that symbol?

• I think your question is fully answered in the linked topic but let me know if you disagree with marking it a duplicate. – Kuba Sep 17 '19 at 6:16
• Agreed. Thank you for pointing me to that linked topic. I am not sure why my searches didn't pull that one up... – Kevin Ausman Sep 17 '19 at 21:25
• No worries, it is really tough to find a duplicate unless you know the answer or have seen it. – Kuba Sep 18 '19 at 6:23

Use ToExpression with its three arguments form and construct the Set programmatically:
   varname="test";

• It is a large, multi-tabbed interface that will be part of a Package. It focuses on nonlinear fitting of experimental data to differential rate equations. I need the user, when the fit is done, to be able to output the results to their own variable. I also need the user to be able to output the state of a bunch of internal variables so that they can reuse the model set parameters when fitting at a later date. Overwriting symbols in my code is not a concern because nearly all of those symbols are local, and I will be adding a way to ensure that the symbol name input is global. – Kevin Ausman Sep 17 '19 at 21:29