Expand my Community achievements bar.

Autopopulate text field with data from multiple other fields

Avatar

Level 1

Hello all,

I know I have seen a forum post about this before, but I can't find it now.

How do I go about autopopulating a text field with the user-entered data from multiple other fields (fields include text fields, date fields, drop down lists, etc). I have put in place a button that, when clicked, would pull info from specified fields to auto-populate the main text field; I would like to keep this system, if possible.

Additionally, it would be really awesome if I could change the font of the data from the different fields when they are sent into the autopopulated field. And, as one more "would be really awesome", it would be awesome if I could have my own text in the coding to be entered inbetween the autopopulated data (so it would have my text reading "The event occured from" then would include the rawValue from a date field, then have my text reading "to" then include the rawValue from a different date field).

Thanks

1 Reply

Avatar

Level 10

Hi,

The text field will have a calculate event, so you could add the following JavaScript script into that;

if (!DateTimeField1.isNull && !DateTimeField2.isNull)

{

    "The event occured from " + DateTimeField1.formattedValue + " to " + DateTimeField2.formattedValue;

}

This script will only populate the text field once the two dates have been entered.

Hope this helps

Bruce