Hi all,
I Need to display static value in the text field and same value should save into one more variable ,
Please advise.
load( local!getTexfieldValue,
{ a!textField( value: "abc", saveInto: { a!save(local!getTexfieldValue,save!value) },),a!textField( value: local!getTexfieldValue,)})
Regards
Pallavi N
Discussion posts and replies are publicly visible
I'm not clear what you're trying to do here over all, but you should note that the saveInto for any field (regardless of what type of field it is) only executes upon user interaction.
Hi Pallavi,
Since that is a static value, can you initialize directly in local variables and use that according to your need in any subsequent form fields.
Hi Mike,
can I get the static value of the text field with out refreshing the text field. I need to save that value to one more local variable so that i can use it to insert into Database.
Hi Chandrasekar,
I am expecting to save the value of this local!value into local!getTexfieldValue to inset this data to database,
I am not displaying this value in interface but i need this value to be saved in local!getTexfieldValue .
load( local!getTexfieldValue, local!value:"Static Value",
a!textField( value:local!value,
saveInto: { local!value, a!save(local!getTexfieldValue,save!value) }, ) )
Please help me
Yes that's right, you can save that way but this will work only if the user types in text field.If you are not sure if the user will do that then you can directly load the vale as Chandrasekar adviced as below:
load( local!value: "Static Value", local!getTexfieldValue: local!value, a!textField( label: local!getTexfieldValue/* Added here to see the reflection, remove it*/, value: local!value, saveInto: { local!value, /* Below save into will save the new value of local!value if user interacts or change the value by tying into text field*/ a!save(local!getTexfieldValue, save!value) } ))
Yeah i can do like this :)
Thank you Dhananjay
it looks like Dhananjay Kumar already gave you a working answer below, but just to clarify, "get static value of a text field" isn't really thinking about it in the right order. A read-only text field just displays a value you feed in, it doesn't "have" a value to "get". Any static values you want to have handy for use in other places on a form should be declared in a local variable, where they'll be accessible for whatever else you want (display, writing to DB, etc).
Thanks Mike