Set Value Of Single Line Text Field by Concatenating two Calculated Values

  • 22 June 2022
  • 7 replies

Userlevel 1
Badge +4

I'm using Nintex Classic Forms2013

Very new and very lost...
I have two Calculated Values: Date_ & Time_

These values update on form load

I want these two values to concatenate into a single line text field, TimeDate

Please and thank you!


Best answer by Garrett 23 June 2022, 17:52

View original

7 replies

Userlevel 6
Badge +15

Hey @kgiles ,


Why not use a Calculated Value control instead of a single Line Text control?


On your Classic Form, Add a Calculated Value control.

Configure the Calculated Value control using the Formula Builder:

(Insert the variable by double-clicking them in the Named controls)

Formula: _Date + _Time

If you need to add a space in between 

Formula: _Date +" " + _Time

Preview the form to check the result. 




Userlevel 1
Badge +4

Thanks for your help!

Setting the value of a single line text field based off of a calculated value is what I'm trying to focus on. I have many uses for this but no easy built in options to perform this action. 

Userlevel 6
Badge +15

Hi @kgiles,

Could you elaborate with an example what you wish to achieve?

Did my suggestion help to resolve your initial issue?

Userlevel 1
Badge +4
I changed up some values:
1. Calculated Value Name = Time_Date
2. Single Line Text Field Name = Destination
3. On form load, I would like Time_Date to set it's value to Destination.
Hope I'm making sense and thank you
Userlevel 6
Badge +15

Hi @kgiles 


Form Controls

1. Calculated Value Name = Time_Date
2. Single Line Text Field Name = Destination

3. Assign the Client ID JavaScript variable name to both control. (Settings - Advance)




4. Place the following code into the Form Settings - Custom JavaScript

NWF.FormFiller.Events.RegisterAfterReady(function() {
var x = NWF$("#" + txtTime_Date).val();
var y = NWF$("#" + txtDestination);

This will assign the value of Time_Date to Destination eg pass Time_Date value to Destination. 

as you stated - "Time_Date to set it's value to Destination."


Form Design

Form Output


hope that helps

Userlevel 1
Badge +4

Thank you so much! This opens a lot of doors. 

Userlevel 6
Badge +15

You're welcome. Glad it manage to open doors for you.