So here’s the code that creates the field and assigns properties to it (the variables are set by a spinner and a menu respectively):
Everything works except the Formula. The field fgAsgtType+"Average" is created as a float field with the #.## output pattern, but nothing is calculated. The procedure does know what the fg variable is; it's creating the field and activating it. But it doesn't want to go from the variable to its contents. If I hand code it with the name of the line item field, it works fine; but somehow the dictionary doesn't get the message. Well, I can see how that would be, I guess--how would the dictionary figure out a value that changes on the fly?
So is there a way to automate getting the correct formula in there when I'm creating a series of different line item fields? Seems as if I need to be passing a parameter, but where and how?