- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2022 09:12 AM
HI All we have a form where we are generating the PDF out of the it. But in the PDF template we have 2 fields for State and 5 fields for Zip code AS shown in the image. Now we have string fields for both
one the data is entered in the fields i would like to separate & split the State like NY to N & Y and paste it on the table side variables that we created for PDF one of the example where i spilt the Name in FIrts , middle and last is below can any one send me sample code for the splittimg the variable into single digit and past it accordingly ?
The above script was written in transform map not i need that on the client script or record producer script
Thank You community
Solved! Go to Solution.
- Labels:
-
HR Service Delivery
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2022 06:14 PM
var data = "57898";
data.split('');
//I am not sure how you would reference the pdf document field, but the individual fields can be filled in from the array.
A = data[0];
B = data[1];
C = data[2];
D = data[3];
E = data[4];
Vinod Kumar Kachineni
Community Rising Star 2022
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2022 09:40 AM
To split a string
var data = "NY city";
data.split('');
//output is an array of characters: ["N", "Y", " ", "c", "i", "t", "y"]
Vinod Kumar Kachineni
Community Rising Star 2022
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2022 02:42 PM
I am getting Data from Record producer to Case and from case to the Document
So City Zipcode is 57898
there are 5 fields on the document named A,B,C,D,E
So data should be stored as 5-> A,7->b,8->C so on..
//Varibale name is "A"
var data = getDisplayValue('u_zipcode')
for(var i =0; i<data.length; i++){
data.split('');
return data[i]; //how can i return the first,second... values ? is this correct ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2022 06:14 PM
var data = "57898";
data.split('');
//I am not sure how you would reference the pdf document field, but the individual fields can be filled in from the array.
A = data[0];
B = data[1];
C = data[2];
D = data[3];
E = data[4];
Vinod Kumar Kachineni
Community Rising Star 2022