Expand my Community achievements bar.

SOLVED

I want to create a field that includes information from 2 other fields

Avatar

Level 2

I have a form that has a field to enter a serial number and a date/time stamp that is calculated. I would like to create a field that populates with that information. I am NOT a scripter- I know very little about it. I feel like I have tried every suggestion I've come across. The field for the serial number is "Serialnumber" and the Date/Time field is "Date_Time". Thank you SO much in advance!!

1 Accepted Solution

Avatar

Correct answer by
Employee

To add to @Magus069 line:

 

Use the initialize event:

Kosta_Prokopiu1_0-1617298316770.png

Kosta_Prokopiu1_1-1617298343100.png

PS: It is not our day-job to follow these groups. Sometimes it can take a while before new postings get read by the right people.

 

View solution in original post

6 Replies

Avatar

Level 2
Never mind. I've learned that this group is not very helpful. I'll figure it out on my own, I guess...

Avatar

Level 10

Hi there, you can simply put your cursor in the calculate script of the field you want those value to appear, hold down ctrl+left click on the field you want to add the value from. This will write down the exact reference syntax needed to access that field. From there you can use either rawValue or formattedValue depending on which type of value you want to display and concatenate them by using the plus sign... it could look something like the following:

SerialNumber.rawValue + " " + Date_Time.formattedValue;

Avatar

Correct answer by
Employee

To add to @Magus069 line:

 

Use the initialize event:

Kosta_Prokopiu1_0-1617298316770.png

Kosta_Prokopiu1_1-1617298343100.png

PS: It is not our day-job to follow these groups. Sometimes it can take a while before new postings get read by the right people.

 

I apologize. My boss wants me to make Livecycle do things I don't think it's supposed to do and he has me stressed out. I did figure it out before your post. Now, I have another question. Is there a way to add periods instead of colons to a time stamp? He wants to save the file with timestamp in it, but Windows doesn't like colons. I figured out how to change them when I'm just doing a time field, but when I concat a date and a time field together, it changes them back to colons...

Avatar

Employee
For the file naming you could use the replace function in JavaScript like + timestamp.rawValue.replace(/:/g, '.')