-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathampscript_auto_full2.json
2938 lines (2917 loc) · 146 KB
/
ampscript_auto_full2.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
{
"Add": {
"desc": [
"Returns the sum of N1 and N2."
],
"args": [
"N1 First value to add",
"N2 Second value to add"
],
"exps": [
"Given @abc=10 and @def=20",
"%%=Add(@abc,@def)=%%",
"The system returns:",
"30"
],
"def": "Add(N1,N2)",
"type": "function",
"cat": "Utilities",
"url": "http:\/\/help.exacttarget.com\/en\/documentation\/exacttarget\/content\/ampscript\/ampscript_syntax_guide\/utilities_ampscript_functions\/#Add"
},
"AddMscrmListMember": {
"desc": [
"Adds the indicated record to the indicated marketing list. No return value."
],
"args": [
"S1 The GUID of the record to add to the marketing list",
"S2 The GUID of the marketing list receiving the marketing list",
"%%[",
"\/* Adds a lead, contact or account to a marketing list *\/",
"var @guid, @list_guid",
"set @guid = '2E438216-2DEE-DD11-AB3E-005056AD58C4'",
"set @list_guid = '0A167EEC-6436-DD11-B7BE-000E7F30252C'",
"AddMscrmListMember(@guid, @list_guid)",
"]%%"
],
"exps": [
],
"def": "AddMscrmListMember(S1,S2)",
"type": "function",
"cat": "For Use With Microsoft Dynamics Crm",
"url": "http:\/\/help.exacttarget.com\/en\/documentation\/exacttarget\/content\/ampscript\/\u2026mpscript_functions_for_use_with_microsoft_dynamics_crm\/#AddMscrmListMember"
},
"AddObjectArrayItem": {
"desc": [
"Appends an object to an array on an API object."
],
"args": [
"O1 The API object containing the array",
"S1 The array property to which an item is to be added",
"S2 The item to be added to the array"
],
"exps": [
"Given the example below:",
"AddObjectArrayItem(@mySubscriber,\"Attribute\",@myNewAttribute)",
"The Attributes array on the mySubscriberObject would receive the attribute myNewAttribute."
],
"def": "AddObjectArrayItem(O1,S1,S2)",
"type": "function",
"cat": "Api",
"url": "http:\/\/help.exacttarget.com\/en\/documentation\/exacttarget\/content\/ampscript\/ampscript_syntax_guide\/api_ampscript_functions\/#AddObjectArrayItem"
},
"AttachFile": {
"desc": [
"AMPscript email attachments must be enabled in your account before you can use this function. Contact ExactTarget if you would like this feature enabled in your account. You should also contact ExactTarget to adjust the threshold of errors that cause the send job to stop prematurely. This could be helpful in preventing a single error from stopping the entire job.",
"Attaches a file to an outgoing email message and can include a link to the file when you view the email as a web page:"
],
"args": [
"S1 Indicates whether to pull files from an HTTP source, the ExactTarget Enhanced FTP site, or the portfolio. Valid values include:",
"HTTP",
"FTP",
"Portfolio",
"S2 Indicates from where the function pulls the attachment. These files must be available at the time of the send, or else your send will encounter an error.",
"If S1 is HTTP, S2 is the URL of your file.",
"If S1 is FTP, S2 is the name of the file in the Import folder of your Enhanced FTP site.",
"If S1 is Portfolio, S2 is the External Key of the item in your Portfolio folder.",
"S3 Indicates the name to give the file when it is attached to the email. This argument is optional and will use the current attachment's name if none is specified.",
"B1 Indicates whether a link to attached file is seen in View As A Web Page. This argument is optional and only used if S1 is HTTP.",
"S4 Sets the URL of the attachment link to be used for View As A Web Page. This argument is optional and only used if S1 is HTTP.",
"S5 Sets the text for the attachment link to be used in View As A Web Page. This argument is optional and only used if S1 is HTTP.",
"N1 Sets the number of days the link attachment will be seen in View As A Web Page. This argument is optional and only used if S1 is HTTP."
],
"exps": [
"The following example attaches a PDF document from a website to your outgoing email. The email also includes a link to the file in View As A Web Page with the text \"Click here to download your catalog.\" That link expires from View As A Web Page after four days.",
"%%=AttachFile(\"HTTP\",\"http:\/\/example.com\/catalog.pdf\",true,\"http:\/\/example.com\/catalog.pdf\",\"Click here to download your catalog\",4)=%%",
"If you want to rename the attachment, enter the optional filename argument as shown below:",
"%%=AttachFile(\"HTTP\",\"http:\/\/example.com\/catalog.pdf\",\"newFileName.pdf\",true,\"http:\/\/example.com\/catalog.pdf\",\"Click here to download your catalog\",4)=%%",
"The next example attaches a Word document from the import folder of the ExactTarget Enhanced FTP site. It also concatenates a new filename from the recipient's full name and the string \"NewCatalog.doc\" at the time of attachment.",
"%%=AttachFile(\"FTP\",\"productCatalog.doc\",Concat(FullName,\"NewCatalog.doc\"))=%%",
"The following file types can be attached to emails sent through ExactTarget :",
"Microsoft Word documents (.doc, .docx)",
"Microsoft Excel documents (.xls, .xlsx)",
"Microsoft Powerpoint documents (.ppt, .pptx)",
"Adobe PDF documents (.pdf)",
"ZIP archive files (.zip)",
"Compressed archive files (.rar)",
"PNG images (.png)",
"GIF images (.gif)",
"JPEG images (.jpg, .jpeg)",
"TIFF images (.tif, .tiff)",
"This function supports secure transmission over HTTPS. If the remote server does not respond to the AttachFile() call within 30 seconds, the send reschedules for 15 minutes later and tries again."
],
"def": "AttachFile(S1,S2,S3,B1,S4,S5,N1)",
"type": "function",
"cat": "Content",
"url": "http:\/\/help.exacttarget.com\/en\/documentation\/exacttarget\/content\/ampscript\/ampscript_syntax_guide\/content_ampscript_functions\/#AttachFile"
},
"AttributeValue": {
"desc": [
"Returns the value of a subscriber attribute."
],
"args": [
"S1 The name of the attribute to be returned"
],
"exps": [
"Combined with a Lookup call to get the name of an attribute, you can retrieve an attribute's value and pass it into a variable. For example, this code retrieves the value of zipcode.",
"VAR @AttributeName, @AttributeValue",
"SET @AttributeName = Lookup(\"PostalCode\",\"zipcode\",\"PostalCode\",Indianapolis)",
"SET @AttributeValue = AttributeValue(@AttributeName)"
],
"def": "AttributeValue(S1)",
"type": "function",
"cat": "Utilities",
"url": "http:\/\/help.exacttarget.com\/en\/documentation\/exacttarget\/content\/ampscript\/ampscript_syntax_guide\/utilities_ampscript_functions\/#AttributeValue"
},
"AuthenticatedEmployeeID": {
"desc": [
"Returns the employee ID of the authenticated landing page user."
],
"args": [
],
"exps": [
"set @ID = AuthenticatedEmployeeID()",
"The system sets @ID to the value of the employee ID for the authenticated landing page user."
],
"def": "AuthenticatedEmployeeID()",
"type": "function",
"cat": "Microsite And Landing Page",
"url": "http:\/\/help.exacttarget.com\/en\/documentation\/exacttarget\/content\/ampscript\/\u2026de\/microsite_and_landing_page_ampscript_functions\/#AuthenticatedEmployeeID"
},
"AuthenticatedEmployeeNotificationAddress": {
"desc": [
"Returns the notification email address of the authenticated landing page user."
],
"args": [
],
"exps": [
"set @address= AuthenticatedEmployeeNotificationAddress()",
"The system sets @address to the value of the notification email address for the authenticated landing page user."
],
"def": "AuthenticatedEmployeeNotificationAddress()",
"type": "function",
"cat": "Microsite And Landing Page",
"url": "http:\/\/help.exacttarget.com\/en\/documentation\/exacttarget\/content\/ampscript\/\u2026landing_page_ampscript_functions\/#AuthenticatedEmployeeNotificationAddress"
},
"AuthenticatedEmployeeUserName": {
"desc": [
"Returns the username of the authenticated landing page user."
],
"args": [
],
"exps": [
"set @username = AuthenticatedEmployeeUserName()",
"The system sets @username to the value of the username for the authenticated landing page user."
],
"def": "AuthenticatedEmployeeUserName()",
"type": "function",
"cat": "Microsite And Landing Page",
"url": "http:\/\/help.exacttarget.com\/en\/documentation\/exacttarget\/content\/ampscript\/\u2026rosite_and_landing_page_ampscript_functions\/#AuthenticatedEmployeeUserName"
},
"AuthenticatedEnterpriseID": {
"desc": [
"Returns the enterprise ID of the authenticated landing page user."
],
"args": [
],
"exps": [
"set @ID = AuthenticatedEnterpriseID()",
"The system sets @ID to the value of the enterprise ID for the authenticated landing page user."
],
"def": "AuthenticatedEnterpriseID()",
"type": "function",
"cat": "Microsite And Landing Page",
"url": "http:\/\/help.exacttarget.com\/en\/documentation\/exacttarget\/content\/ampscript\/\u2026\/microsite_and_landing_page_ampscript_functions\/#AuthenticatedEnterpriseID"
},
"AuthenticatedMemberID": {
"desc": [
"Returns the member ID of the authenticated landing page user."
],
"args": [
],
"exps": [
"set @ID = AuthenticatedMemberID()",
"The system sets @ID to the value of the member ID for the authenticated landing page user."
],
"def": "AuthenticatedMemberID()",
"type": "function",
"cat": "Microsite And Landing Page",
"url": "http:\/\/help.exacttarget.com\/en\/documentation\/exacttarget\/content\/ampscript\/\u2026uide\/microsite_and_landing_page_ampscript_functions\/#AuthenticatedMemberID"
},
"AuthenticatedMemberName": {
"desc": [
"Returns the member name of the authenticated landing page user."
],
"args": [
],
"exps": [
"set @membername = AuthenticatedMemberName()",
"The system sets @membername to the value of the member name for the authenticated landing page user."
],
"def": "AuthenticatedMemberName()",
"type": "function",
"cat": "Microsite And Landing Page",
"url": "http:\/\/help.exacttarget.com\/en\/documentation\/exacttarget\/content\/ampscript\/\u2026de\/microsite_and_landing_page_ampscript_functions\/#AuthenticatedMemberName"
},
"BarCodeURL": {
"desc": [
"Takes the information supplied in the function and generates the specified bar code.",
"This function requires additional configuration by ExactTarget for use in your account. Your account must also be enabled to use the Live Content feature. Please contact your ExactTarget representative for more information on enabling this feature."
],
"args": [
"S1 Value to be converted into a bar code",
"S2 Type of bar code to create - possible values listed below:",
"Codabar",
"Code11",
"Code128Auto",
"Code128A",
"Code128B",
"Code128C",
"Code39",
"Code39Ext",
"Code93",
"Code93Ext",
"Ean13",
"Ean8",
"Industr25",
"Interl25",
"Mat25",
"MSI",
"Postnet",
"Planet",
"Telepen",
"UPCa",
"UPCe",
"OneCode",
"DataMatrix",
"PDF417",
"PlainText",
"N1 Height of bar code in pixels",
"N2 Width of bar code in pixels",
"S3 Checksum value for bar code (optional)",
"B1 Display bar code value from S1 as text",
"0 Displays the alt text provided in the S4 value",
"1 Displays the S1 value as text with the barcode",
"S4 Alt text to display if B1 contains a value of 1",
"N3 Orientation of the bar code",
"0 Display bar code horizontally (default)",
"90 Display bar code rotated 90? to the right",
"180 Display bar code rotated 180?",
"270 Display bar code rotated 90? to the left",
"B1 Display a transparent background for the barcode",
"0 Do not display a transparent background",
"1 Display a transparent background"
],
"exps": [
"When the AMPscript below is placed in a content area, the email messages receives the applicable bar code at the time of the send:",
"<p>",
"<img style=\"width: 400px; height: 200px\" title=barcode border=0 hspace=0 alt=barcode src='%%=BarCodeURL(\"BBY01-397101069285\",\"Code39\", 400, 200, 0)=%%' width=400 height=200>",
"<\/p>",
"The AMPscript generates a bar code based on the value in Code39 format in the specified height and width.",
"The AMPscript below displays the bar code with the listed alt text and rotated 90? to the right on a transparent background.",
"%%=BarCodeURL(\"BBY01-397101069285\",\"Code39\", 400, 200, 0, 0, \"Alt Text\", 90, 1)=%%",
"The AMPscript below displays the bar code with the S1 value as text and rotated 90? to the right on a transparent background. Note that the single quotes must be included when using the S1 value as text to prevent the function from returning an error.",
"%%=BarCodeURL('9X4H341ZTKTPMN7T','Code128B', 231, 55, 0, 1,'',90,1)=%%"
],
"def": "BarCodeURL(S1,S2,N1,N2,S3)",
"type": "function",
"cat": "Content",
"url": "http:\/\/help.exacttarget.com\/en\/documentation\/exacttarget\/content\/ampscript\/ampscript_syntax_guide\/content_ampscript_functions\/#BarCodeURL"
},
"Base64Decode": {
"desc": [
"Decodes Base64 information into human-readable text."
],
"args": [
"S1 The location of the Base64 text, either in a variable or a data extension field (via the Lookup() AMPscript function)",
"S2 The character type to be used in the decoding process, i.e. UTF-8, UTF-16 or other .NET-supported character type (Optional)",
"B1 Indicates whether the email send proceeds if the value of S1 is incorrectly coded. Valid values include the following:",
"0 - The send proceeds even if that send encounters an error",
"1 - The send fails if it encounters an error and no message goes out (this is the default behavior if not specified)"
],
"exps": [
"%%[",
"VAR @encodedStr, @decodedStr",
"SET @encodedStr = Lookup(\"Base64Info\", \"ReceiptData\", \"ReceiptKey\", 1)",
"SET @decodedStr = Base64Decode(@encodedStr,\"UTF-8\")",
"]%%",
"The Lookup() function retrieves the Base64 information from the data extension, and the Base64Decode() decodes the Base64 information and assigns that value to the @decodedStr variable in UTF-8 format. If for some reason the value of @encodedStr is incorrect, the 1 at the end of the Base64Decode() function causes the send to fail due to the error.",
"%%[",
"VAR @encodedStr, @decodedStr",
"SET @encodedStr = Lookup(\"Base64Info\", \"ReceiptData\", \"ReceiptKey\", 0)",
"SET @decodedStr = Base64Decode(@encodedStr,\"UTF-8\", 1)",
"]%%",
"If the value was 0, the send would continue and the email would contain an empty string instead of the decoded data."
],
"def": "Base64Decode(S1,S2)",
"type": "function",
"cat": "Utilities",
"url": "http:\/\/help.exacttarget.com\/en\/documentation\/exacttarget\/content\/ampscript\/ampscript_syntax_guide\/utilities_ampscript_functions\/#Base64Decode"
},
"Base64Encode": {
"desc": [
"Encodes human-readable text into Base64 information."
],
"args": [
"S1 The location of the text to be encrypted, either in a variable or a data extension field (via the Lookup() AMPscript function)"
],
"exps": [
"%%[",
"VAR @normalStr, @encodedStr",
"SET @normalStr = Lookup(\"ForBase64Info\", \"ReceiptData\", \"ReceiptKey\", 1)",
"SET @encodedStr = Base64Encode(@normalStr)",
"]%%",
"The Lookup() function retrieves the text information from the data extension, and the Base64Encode() encodes the text into Base64 information and assigns that value to the @encodedStr variable."
],
"def": "Base64Encode(S1)",
"type": "function",
"cat": "Utilities",
"url": "http:\/\/help.exacttarget.com\/en\/documentation\/exacttarget\/content\/ampscript\/ampscript_syntax_guide\/utilities_ampscript_functions\/#Base64Encode"
},
"BeginImpressionRegion": {
"desc": [
"Denotes the beginning of a region to be tracked with impression tracking."
],
"args": [
"S1 Name of the impression region"
],
"exps": [
"%%=BeginImpressionRegion(Header)=%%",
"The system begins an impression tracking region called Header."
],
"def": "BeginImpressionRegion(S1)",
"type": "function",
"cat": "Content",
"url": "http:\/\/help.exacttarget.com\/en\/documentation\/exacttarget\/content\/ampscript\/ampscript_syntax_guide\/content_ampscript_functions\/#BeginImpressionRegion"
},
"BuildOptionList": {
"desc": [
"Builds a list of options from which a message recipient can select."
],
"args": [
"S1 Value of this variable determines which option will be selected by default",
"S2 Value of first option on list",
"S3 Presentation name of first option on list",
"S2 and S3 are repeated for each option on the list."
],
"exps": [
"Given attribA=2",
"%%=BuildOptionList(AttribA, \"1\", \"One\", \"2\", \"Two\", \"3\", \"Three\")=%%",
"The system returns:",
"<option value=\"1\">One<\/option>",
"<option value=\"2\" selected=\"selected\">Two<\/option>",
"<option value=\"3\">Three<\/option>"
],
"def": "BuildOptionList(S1,S2,S3)",
"type": "function",
"cat": "Content",
"url": "http:\/\/help.exacttarget.com\/en\/documentation\/exacttarget\/content\/ampscript\/ampscript_syntax_guide\/content_ampscript_functions\/#BuildOptionList"
},
"BuildRowSetFromString": {
"desc": [
"Creates a rowset from a character string by splitting the string at the specified delimiter."
],
"args": [
"S1 String to be split",
"S2 Optional parameter to indicate split. For example, comma (,) or pipe symbol (|)."
],
"exps": [
"BuildRowsetFromString(\"123|456|789\", \"|\")",
"Returns a data table with three rows:",
"123 456 789",
"The sample code below demonstrates how to pass attribute names and process them:",
"%%[",
"Var @queryparams",
"Var @row",
"Var @name",
"Var @value",
"Set @queryparams = BuildRowsetFromString(QueryParameter(\"names\"),\"|\")",
"for @i = 1 to Rowcount(@queryparams) do",
"Set @row = Row(@queryparams, @i)",
"Set @name = Field(@row,1)",
"Set @value = QueryParameter(@name)",
"]%%",
"Passed <b>name:<\/b> %%= v(@name) =%% with <b>value:<\/b> %%= v(@value) =%%<br\/>",
"%%[",
"next @i",
"]%%",
"When passed the input below:",
"names=career|firstname|lastname&career=marketer&firstname=Angela&lastname=Ruiz",
"The AMPscript returns the following:",
"Passed name: career with value: marketer",
"Passed name: firstname with value: Angela",
"Passed name: lastname with value: Ruiz",
"This function returns the rowset in one column, and this column does not have an assigned name. When referring to this column within a function (such as the example listed below), you must refer to the column with an ordinal number:",
"Field(Row(BuildRowSetFromString('123|456', '|'), 1), 1)"
],
"def": "BuildRowSetFromString(S1,S2)",
"type": "function",
"cat": "Content",
"url": "http:\/\/help.exacttarget.com\/en\/documentation\/exacttarget\/content\/ampscript\/ampscript_syntax_guide\/content_ampscript_functions\/#BuildRowSetFromString"
},
"BuildRowSetFromXML": {
"desc": [
"Creates a rowset from XML, and can return an empty rowset on error. This function is for use at send time only.",
"Value: Value of the node (empty for CDATA, Comment, Document, Document Fragments, DocumentType, Entities, Entity References, Notation, ProcessingInformation, Whitespace, and XmlDeclaration nodes) For element nodes, this is the text of the node.",
"XML: Any XML contained within the node (empty, if the node does not contain XML). Also provides a column for each attribute found in any of the nodes. If a node is missing a value for that attribute, an empty value is returned."
],
"args": [
"S1 XML within the node",
"S2 XPATH argument",
"B1 The returnEmptyRowsetOnError, specified as a Boolean"
],
"exps": [
"Given the @xml variable contains the following text:",
"<root>",
"<Flight origin=\"IND\" dest=\"NYC\">100.00<\/Flight>",
"<Flight origin=\"IND\" dest=\"LAX\" carrier=\"UAL\">200.00<\/Flight>",
"<Flight origin=\"IND\" dest=\"SEA\">500<PerBagSurcharge>25<\/PerBagSurcharge><\/Flight>",
"<\/root>",
"Using the following function call:",
"BuildRowsetFromXml(@xml, \"\/\/Flight\", 1)",
"The system returns the following rowset:",
"Value Xml Origin_att Dest_att Carrier_att 100.00 100.00 IND NYC \"\" 200.00 200.00 IND LAX UAL 500 500<PerBagSurcharge>25<\/PerBagSurcharge> IND SEA \"\""
],
"def": "BuildRowSetFromXML(S1,S2,B1)",
"type": "function",
"cat": "Content",
"url": "http:\/\/help.exacttarget.com\/en\/documentation\/exacttarget\/content\/ampscript\/ampscript_syntax_guide\/content_ampscript_functions\/#BuildRowSetFromXML"
},
"Char": {
"desc": [
"Returns the ASCII character specified by the ASCII character code in the first parameter. An optional second parameter specifies the number of times to repeat the return of the ASCII character."
],
"args": [
"S1 Character Code",
"S2 Number of times to repeat the ASCII character (Optional)"
],
"exps": [
"Given the function below:",
"Char(65)",
"The system returns:",
"A",
"Given the function below:",
"Char(65,3)",
"The system returns:",
"AAA",
"Given the function below:",
"%%=CHAR(65)=%%%%=CHAR(66)=%%%%=CHAR(67)=%%",
"The system returns:",
"ABC",
"The code sample below pulls content from a data extension and replaces and carriage return-line feed combinations with an HTML <br> tag.",
"%%[",
"VAR @content, @replacedContent",
"\/* This will pull the content out of the DE and replace any CR-LF's with HTML BR tags. *\/",
"SET @content = Lookup(\"ReplaceTest\", \"Value\", \"Key\", \"1\")",
"SET @replacedContent = Replace(@content, Concat(CHAR(13), CHAR(10)), \"<BR>\")",
"]%%",
"%%=V(@content)=%%",
"%%=V(@replacedContent)=%%"
],
"def": "Char(S1,S2)",
"type": "function",
"cat": "Utilities",
"url": "http:\/\/help.exacttarget.com\/en\/documentation\/exacttarget\/content\/ampscript\/ampscript_syntax_guide\/utilities_ampscript_functions\/#Char"
},
"ClaimRow": {
"desc": [
"Returns a row from a data extension and locks the row to prevent the information from being used in another context until the row's \"claimed\" status changes. If the function finds a row with the correct matching set of keys, the function returns those values. If no claimed row is found, the function sets key values in an unclaimed row and returns that row. If no row is returned by this function at all, you must set up the function to raise an error, ignore the result, or provide default content.",
"The data extensions used with this function must possess the following characteristics:",
"A Boolean column that indicates whether the row has been claimed or not (a true value indicates the row as claimed)",
"An index on the Boolean and _CustomObjectKey columns to allow for an efficient lookup of claimed rows",
"One or more key columns used to identify the object or recipient that has claimed or is claiming the row (this column must be nullable)",
"An index on the key column or columns to allow an efficient lookup of claimed rows",
"The application automatically sets indexes on sendable data extensions, and you should contact your ExactTarget representative to set indexes for non-sendable data extensions.",
"You can also include an optional column to receive a datetime stamp at the time the application executes the ClaimedRow() function. You must name this column ClaimedDate and assign it the Date data type. When this column exists, the ClaimedDate value in that row receives the datetime stamp for when that row was claimed.",
"You cannot overwrite or delete the data extension with a claimed status."
],
"args": [
"S1 The name of the data extension for the claim or retrieve action",
"S2 The name of the column in the data extension that indicates whether the row is claimed or not",
"S3 The name of the data extension key column",
"S4 The value of the data extension key column",
"You can specify multiple pairs of column names and values, depending on your needs."
],
"exps": [
"The code below claims a row or retrieves the information from a previously claimed row. If no row matches the specified values, the function indicates no coupon codes are available.",
"<table>",
"<tr>",
"<td>Coupon Code (ClaimRow)<\/td>",
"<td>",
"%%[VAR @CouponRow",
"SET @CouponRow = ClaimRow(\"Coupon\", \"IsClaimed\", \"JobID\", JobID, \"ListID\", ListID, \"BatchID\", _JobSubscriberBatchID, \"SubscriberID\", SubscriberID)",
"IF EMPTY(@CouponRow) THEN ]%%",
"No coupons available",
"%%[ ELSE ]%%",
"Your Coupon Code is %%= FIELD(@CouponRow,\"CouponCode\") =%%",
"%%[ ENDIF ]%%",
"<\/td>",
"<\/tr>",
"<\/table>",
"Use the example data extension below as a model for the data extension you use to store and claim rows:",
"Column NameTypeNullDefault Value",
"_CustomObjectKey",
"bigint",
"No",
"Identity",
"CouponCode",
"nvarchar(30)",
"No",
"IsClaimed",
"Boolean",
"No",
"0",
"JobID",
"int",
"Yes",
"ListID",
"int",
"Yes",
"BatchID",
"int",
"Yes",
"SubscriberID",
"int",
"Yes",
"EmailAddress",
"nvarchar(100)",
"Yes",
"ClaimedDate",
"datetime",
"Yes"
],
"def": "ClaimRow(S1,S2,S3,S4,...Sn,Sn+1)",
"type": "function",
"cat": "Data Extension",
"url": "http:\/\/help.exacttarget.com\/en\/documentation\/exacttarget\/content\/ampscript\/ampscript_syntax_guide\/data_extension_ampscript_functions\/#ClaimRow"
},
"ClaimRowValue": {
"desc": [
"Returns a value from a column in an data extension and locks the row to prevent the information from being used in another context until the value's \"claimed\" status changes. If the function finds a value with the correct matching set of keys, the function returns the requested column value. If no row is found, the function attempts to claim an unused row. If a row cannot be found or claimed, the function returns the specified default value. Otherwise, the function returns an error.",
"The data extensions used with this function must possess the following characteristics:",
"A Boolean column that indicates whether the row has been claimed or not (a true value indicates the row as claimed)",
"An index on the Boolean and _CustomObjectKey columns to allow for an efficient lookup of claimed rows",
"One or more key columns used to identify the object or recipient that has claimed or is claiming the row (this column must be nullable)",
"An index on the key column or columns to allow an efficient lookup of claimed rows",
"The application automatically sets indexes on sendable data extensions, and you should contact your ExactTarget representative to set indexes for non-sendable data extensions",
"You can also include an optional column to receive a datetime stamp at the time the application executes the ClaimedRowValue() function. You must name this column ClaimedDate and assign it the Date data type. When this column exists, the ClaimedDate value in that row receives the datetime stamp for when the value and row were claimed.",
"You cannot overwrite or delete the data extension with a \"claimed\" status."
],
"args": [
"S1 The name of the data extension for the claim or retrieve action",
"S2 The name of the column in the data extension from which the return value is retrieved",
"S3 The name of the column in the data extension that indicates whether the row is claimed or not",
"S4 (Optional) The default value to use in case the function fails to claim a row",
"S5 The name of the data extension key column",
"S6 The value of the data extension key column",
"You can specify multiple pairs of column names and values, depending on your needs. If no row is returned by this function, you must set up the function to raise an error, ignore the result, or provide default content."
],
"exps": [
"The sample below retrieves the same information from the same row any time a specific job sends to a specific recipient.",
"<table>",
"<tr>",
"<td>Coupon Code (ClaimRowValue no default)<\/td>",
"<td>%%= ClaimRowValue(\"Coupon\", \"CouponCode\", \"IsClaimed\", , \"JobID\", JobID, \"ListID\", ListID, \"SubscriberID\", SubscriberID) =%%<\/td>",
"<\/tr>",
"<\/table>",
"The sample below retrieves a distinct row each time a specific job sends to a specific recipient. If the function does not find an appropriate value, it uses the provided default information.",
"<table>",
"<tr>",
"<td>Coupon Code (ClaimRowValue with default)<\/td>",
"<td>%%= ClaimRowValue(\"Coupon\", \"CouponCode\", \"IsClaimed\", \"None Available\", \"JobID\", JobID, \"ListID\", ListID, \"BatchID\", _JobSubscriberBatchID, \"SubscriberID\", SubscriberID) =%%<\/td>",
"<\/tr>",
"<\/table>",
"Use the example data extension below as a model for the data extension you use to store and claim rows:",
"Column NameTypeNullDefault Value",
"_CustomObjectKey",
"bigint",
"No",
"Identity",
"CouponCode",
"nvarchar(30)",
"No",
"IsClaimed",
"Boolean",
"No",
"0",
"JobID",
"int",
"Yes",
"ListID",
"int",
"Yes",
"BatchID",
"int",
"Yes",
"SubscriberID",
"int",
"Yes",
"EmailAddress",
"nvarchar(100)",
"Yes",
"ClaimedDate",
"datetime",
"Yes"
],
"def": "ClaimRowValue(S1,S2,S3,S4,S5,S6,...Sn, Sn+1)",
"type": "function",
"cat": "Data Extension",
"url": "http:\/\/help.exacttarget.com\/en\/documentation\/exacttarget\/content\/ampscript\/ampscript_syntax_guide\/data_extension_ampscript_functions\/#ClaimRowValue"
},
"Concat": {
"desc": [
"Concatenates the strings specified in the arguments."
],
"args": [
"S1-Sn Strings to concatenate"
],
"exps": [
"%%=Concat(\"a\",\"b\",\"c\")=%%",
"The system returns:",
"abc"
],
"def": "Concat(S1,S2,...Sn)",
"type": "function",
"cat": "Utilities",
"url": "http:\/\/help.exacttarget.com\/en\/documentation\/exacttarget\/content\/ampscript\/ampscript_syntax_guide\/utilities_ampscript_functions\/#Concat"
},
"ContentArea": {
"desc": [
"Returns content contained in the specified stored content area."
],
"args": [
"I1 The ID of the content area to return.",
"S1 Impression region name. Use this optional parameter for impression tracking. Setting an impression region this way is the same as using the BeginImpressionRegion() function as the first statement in the content area. Impression regions started this way remain open after the function executes.",
"B1 The ThrowError value defaults to true. When the value is true, the function throws an error If the specified content area is not found or not valid. If the value is false, the function uses the value of the DefaultContent parameter instead of throwing an error. This parameter is optional.",
"S3 The DefaultContent value defaults to an empty string. If the ThrowError value is false, the DefaultContent value is used. This parameter is optional.",
"N1 This output parameter returns the status of the call (optional). Possible values include:",
"0 The content area was found and successfully rendered",
"-1 Either the content area was not found or not valid. In this case, the function returns the DefaultContent value."
],
"exps": [
"%%=ContentArea(\"14\")=%%",
"The system returns the content of content area 14."
],
"def": "ContentArea(I1,S1,B1,S2,N1)",
"type": "function",
"cat": "Content",
"url": "http:\/\/help.exacttarget.com\/en\/documentation\/exacttarget\/content\/ampscript\/ampscript_syntax_guide\/content_ampscript_functions\/#ContentArea"
},
"ContentAreaByName": {
"desc": [
"Returns the content contained in the specified stored content area."
],
"args": [
"S1 Name of the content area for which to return content. If the content area is stored in a folder within the my contents folder, the name includes the path to the content area.",
"S2 Impression region name. Use this optional parameter for impression tracking. Setting an impression region this way is the same as using the BeginImpressionRegion() function as the first statement in the content area. Impression regions started this way remain open after the function executes.",
"B1 The ThrowError value defaults to true. When the value is true, the function throws an error If the specified content area is not found or not valid. If the value is false, the function uses the value of the DefaultContent parameter instead of throwing an error. This parameter is optional.",
"S3 The DefaultContent value defaults to an empty string. If the ThrowError value is false, the DefaultContent value is used. This parameter is optional.",
"N1 This output parameter returns the status of the call (optional). Possible values include:",
"0 The content area was found and successfully rendered",
"-1 Either the content area was not found or not valid. In this case, the function returns the DefaultContent value."
],
"exps": [
"%%=ContentAreaByName(\"my contents\\Stocks\\Weekly Portfolio\")=%%",
"The system returns the content of stored content area named Weekly Portfolio in the Stocks folder.",
"In this example:",
"%%=ContentAreaByName(\"my contents\\OptOut_Page\\Form\\Opt Out Form 2\",\"\",0,ContentAreaByName(\"my contents\\OptOut_Page\\Form\\Opt Out Form Default\"))=%%",
"The function displays the Opt Out Form Default page if no other content is found.",
"This example concatenates the base content area name with a Locale ID to provide an opt-out form in the appropriate language. If no Locale ID is specified, the function defaults to EN-US.",
"%%=ContentAreaByName(Concat(\"my contents\\OptOut_Page\\Form\\Opt Out Form \",Uppercase(IIF(Empty(QueryParameter(\"lang\")),\"en-us\",QueryParameter(\"lang\")))),\"\",0,ContentAreaByName(\"my contents\\OptOut_Page\\Form\\Opt Out Form EN-US\"))=%%"
],
"def": "ContentAreaByName(S1,S2,B1,S3,N1)",
"type": "function",
"cat": "Content",
"url": "http:\/\/help.exacttarget.com\/en\/documentation\/exacttarget\/content\/ampscript\/ampscript_syntax_guide\/content_ampscript_functions\/#ContentAreaByName"
},
"CreateMscrmRecord": {
"desc": [
"Creates a single Dynamics CRM record in the target entity. Returns the GUID of the created record."
],
"args": [
"S1 The name of the Dynamics CRM entity for the record to create",
"S2 The number of Name\/Value pairs of fields to populate on the created record",
"S3a, S3b Name\/Value pairs of attributes to populate on the created record",
"%%[",
"\/* Sample Code - this creates a new Contact record *\/",
"var @contact_guid",
"set @contact_guid = createmscrmrecord('contact', 3, 'firstname', 'bob', 'lastname', 'testcontact', 'emailaddress1', 'bob@example.com')",
"]%%",
"<p>GUID of new Contact:<\/p><br>",
"%%=v(@contact_guid)=%%"
],
"exps": [
],
"def": "CreateMscrmRecord(S1,S2,S3a,S3b)",
"type": "function",
"cat": "For Use With Microsoft Dynamics Crm",
"url": "http:\/\/help.exacttarget.com\/en\/documentation\/exacttarget\/content\/ampscript\/\u2026ampscript_functions_for_use_with_microsoft_dynamics_crm\/#CreateMscrmRecord"
},
"CreateObject": {
"desc": [
"Returns a new ExactTarget web service API object."
],
"args": [
"S1 The API Object receiving the new item in text form"
],
"exps": [
"SET @subscriber = CreateObject(\"Subscriber\")",
"Creates a new Subscriber object for the web service API.",
"An object created with CreateObject() should only be used for one particular API call. So, if a Subscriber object is created and then updated via InvokeUpdate, it cannot be passed to a Triggered Send."
],
"def": "CreateObject(S1)",
"type": "function",
"cat": "Api",
"url": "http:\/\/help.exacttarget.com\/en\/documentation\/exacttarget\/content\/ampscript\/ampscript_syntax_guide\/api_ampscript_functions\/#CreateObject"
},
"CreateSalesforceObject": {
"desc": [
"Creates a record in your integrated Salesforce account and returns the ID of the record created. This function works only if your account is integrated with a Salesforce account."
],
"args": [
"S1 The type of object to create a record in. For example, Lead or CustomObject__c",
"I1 The number of fields you are specifying in the record to add.",
"S2a.Sna The name of the field (from Salesforce) that you are specifying.",
"S2b.Snb The value of the field."
],
"exps": [
"%%[ var @id",
"set @id=CreateSalesforceObject(\"lead\", 2, \"FirstName\", \"Chris\", \"LastName\", \"Cruz\")",
"]%%",
"The system creates a lead in the integrated Salesforce account where the FirstName field contains Chris and the LastName field contains Cruz."
],
"def": "CreateSalesforceObject(S1,I1,S2a,S2b,...Sna,Snb)",
"type": "function",
"cat": "For Use With Salesforcecom",
"url": "http:\/\/help.exacttarget.com\/en\/documentation\/exacttarget\/content\/ampscript\/\u2026ide\/ampscript_functions_for_use_with_salesforcecom\/#CreateSalesforceObject"
},
"DateAdd": {
"desc": [
"Returns the sum of a date and an integer, along with a time stamp."
],
"args": [
"D1 Date to add",
"I1 Integer to add",
"S1 Unit of time of the integer. Valid values include Y, M, D, H, and MI."
],
"exps": [
"%%=DateAdd(@today, \"1\",\"D\")=%%",
"The system returns tomorrow's date, along with a time stamp."
],
"def": "DateAdd(D1, I1, S1)",
"type": "function",
"cat": "Datetime",
"url": "http:\/\/help.exacttarget.com\/en\/documentation\/exacttarget\/content\/ampscript\/ampscript_syntax_guide\/datetime_ampscript_functions\/#DateAdd"
},
"DateDiff": {
"desc": [
"Returns the difference between two dates."
],
"args": [
"D1 The date from which to subtract D2",
"D2 Date to subtract from D1",
"S1 Unit of time of the difference. Valid values include Y, M, D, H, or MI"
],
"exps": [
"%%=DateDiff(@tomorrow,@today, \"D\")=%%",
"System returns:",
"-1"
],
"def": "DateDiff(D1, D2, S1)",
"type": "function",
"cat": "Datetime",
"url": "http:\/\/help.exacttarget.com\/en\/documentation\/exacttarget\/content\/ampscript\/ampscript_syntax_guide\/datetime_ampscript_functions\/#DateDiff"
},
"DateParse": {
"desc": [
"Returns a DateTime object from a date string."
],
"args": [
"S1 The date string from which to derive the DateTime object",
"B1 (Optional) Determines whether the DateTime object is returned as UTC"
],
"exps": [
"DateParse(\"2009\/10\/17 02:30PM\")",
"System returns a local time of 2:30pm.",
"DateParse(\"2009\/10\/17 2:30PM-4:00\",1)",
"System returns 6:30pm as the UTC time based off of the local time value."
],
"def": "DateParse(S1,B1)",
"type": "function",
"cat": "Datetime",
"url": "http:\/\/help.exacttarget.com\/en\/documentation\/exacttarget\/content\/ampscript\/ampscript_syntax_guide\/datetime_ampscript_functions\/#DateParse"
},
"DatePart": {
"desc": [
"Returns a specified part of a date."
],
"args": [
"D1 Date from which a specified part is retrieved.",
"S1 The part of the date to retrieve. Valid values include year (Y), month (M), monthname, day (D), hour (H), and minute (MI)."
],
"exps": [
"%%=Datepart(\"5\/1\/2008\",\"year\")=%%",
"System returns:",
"2008"
],
"def": "DatePart(D1, S1)",
"type": "function",
"cat": "Datetime",
"url": "http:\/\/help.exacttarget.com\/en\/documentation\/exacttarget\/content\/ampscript\/ampscript_syntax_guide\/datetime_ampscript_functions\/#DatePart"
},
"DecryptSymmetric": {
"desc": [
"Decrypts encrypted data using the supplied algorithm and encryption values. You can supply either a value or a valid external key for the password, initialization vector, and Salt. You can also use the external keys if you have previously created keys in the Key Management section of the user interface. Otherwise, the function generates a password using the password parameter or stored value, the Salt parameter or stored value, and the IV parameter or stored value. If you do not pass or reference an initialization vector, the function uses the password parameter or stored value as the initialization vector.",
"This function treats Salt and IV values (either directly provided or looked up by key) as hex strings, with each pair of characters repesenting a single byte in the larger strings. Do not attempt to use these values as a cipher string, as you cannot successfully decrypt those strings use this function."
],
"args": [
"S1 Encrypted data passed to the function",
"S2 Algorithm used to encrypt the data:",
"aes - AES algorithm",
"des - DES algorithm",
"tripledes - TripleDES algorithm",
"Mode (Optional, for use with DES and TripleDES only):",
"cbc (default)",
"ecb",
"ofb",
"cfb",
"cts",
"Padding (Optional, for use with DES and TripleDES only):",
"none",
"pkcs7 (default)",
"zeros",
"ansix923",
"iso10126",
"S3 Password external key",
"S4 Password",
"S5 Salt external key",
"S6 Salt",
"S7 Initialization vector external key",
"S8 Initialization vector"
],
"exps": [
"The example below sets the @clearData variable to the value of the @endData once the function decrypts that data. This example uses provided values for the password, salt, and IV, and it sets any external key values to the undeclared variable @null. Note that the Salt and IV values provided in the example below represent hex string values - the Salt value includes 8 bytes of information, and the IV value provides 16 bytes.",
"SET @clearData=DecryptSymmetric(@encData, \"AES\", @null, \"aardvark\", @null, \"0000000000000000\", @null, \"00000000000000000000000000000000\")",
"The example below uses external keys instead of provided values:",
"SET @clearData=DecryptSymmetric(@encData, \"AES\", @passwordExternalKey, @null, @saltExternalKey, @null, @IVExternalKey, @null)",
"SET @clearData=DecryptSymmetric(@encData, \"AES\", \"passwordExternalKey\", @null, \"saltExternalKey\", @null, \"IVExternalKey\", @null)"
],
"def": "DecryptSymmetric(S1, S2, S3, S4, S5, S6, S7, S8)",
"type": "function",
"cat": "Utilities",
"url": "http:\/\/help.exacttarget.com\/en\/documentation\/exacttarget\/content\/ampscript\/ampscript_syntax_guide\/utilities_ampscript_functions\/#DecryptSymmetric"
},
"DeleteData": {
"desc": [
"Deletes rows in a data extension with column values specified in name value pairs. The number of rows affected is returned. You can also use this function with SMS data."
],
"args": [
"S1 Data extension from which to delete the specified row",
"S2 Name of the column to use to identify the rows to delete.",
"S3 Value to use to identify the rows to delete."
],
"exps": [
"DeleteData(\"SendDE\", \"_SubscriberKey\",\"12345\")",
"The system deletes rows in the SendDE data extension whose _SubscriberKey column contains the value 12345 and returns the number of rows that were deleted."
],
"def": "DeleteData(S1, S2, S3)",
"type": "function",
"cat": "Microsite And Landing Page",
"url": "http:\/\/help.exacttarget.com\/en\/documentation\/exacttarget\/content\/ampscript\/\u2026pt_syntax_guide\/microsite_and_landing_page_ampscript_functions\/#DeleteData"
},
"DeleteDE": {
"desc": [
"Deletes rows in a data extension with column values specified in name value pairs. No value is returned. This function is for use with email messages at send time only."
],
"args": [
"S1 The name of the data extension from which to delete the specified row",
"S2 Name of the column to use to identify the rows to delete.",
"S3 Value to use to identify the rows to delete."
],
"exps": [
"DeleteDE(\"SendDE\", \"_SubscriberKey\",\"12345\")"
],
"def": "DeleteDE(S1, S2, S3)",
"type": "function",
"cat": "Data Extension",
"url": "http:\/\/help.exacttarget.com\/en\/documentation\/exacttarget\/content\/ampscript\/ampscript_syntax_guide\/data_extension_ampscript_functions\/#DeleteDE"
},
"DescribeMscrmEntities": {
"desc": [
"Returns the logical name and display name of all Microsoft Dynamics CRM entities"
],
"args": [
],
"exps": [
"%%[",
"\/* Sample code to get a list of all entities in a Dynamics CRM account to a record set *\/",
"var @entities_rs",
"set @entities_rs = describemscrmentities()",
"]%%",
"<p> Here is a list of CRM Entities <\/p>",
"%%[",
"var @entity_name, @entity_displayname, @counter",
"for @counter = 1 to rowcount(@entities_rs) do",
"set @entity_name = field(row(@entities_rs,@counter), 'Name')",
"set @entity_displayname = field(row(@entities_rs,@counter), 'DisplayName')",
"]%%",
"Entity Name: %%=v(@entity_name)=%% <br>",
"Entity Display Name: %%=v(@entity_displayname)=%% <br> <br><br>",
"%%[ next @counter ]%%"
],
"def": "DescribeMscrmEntities()",
"type": "function",
"cat": "For Use With Microsoft Dynamics Crm",
"url": "http:\/\/help.exacttarget.com\/en\/documentation\/exacttarget\/content\/ampscript\/\u2026cript_functions_for_use_with_microsoft_dynamics_crm\/#DescribeMscrmEntities"
},
"DescribeMscrmEntityAttributes": {
"desc": [
"Returns the logical name, display name, and type of the Dynamics CRM entity. If the attribute is Boolean, status, a picklist, or a state, the function returns a comma-separated list of option and display values."
],
"args": [
"S1 The Dynamics CRM entity from which to retrieve attributes",
"%%[",
"var @fields_rs",
"set @fields_rs = describemscrmentityattributes('lead')",
"]%%",
"<p> Here is a list of Fields in the Lead Entity <\/p>",
"%%[",
"var @field_name, @field_displayname, @counter, @field_type, @field_required, @field_options",
"for @counter = 1 to rowcount(@fields_rs) do",
"set @field_name = field(row(@fields_rs,@counter), 'Name')",
"set @field_displayname = field(row(@fields_rs,@counter), 'DisplayName')",
"set @field_type = field(row(@fields_rs,@counter), 'Type')",
"set @field_required = field(row(@fields_rs,@counter), 'Required')",
"set @field_options = field(row(@fields_rs,@counter), 'Options')",
"]%%",
"Field Name: %%=v(@field_name)=%% <br>",
"Field Display Name: %%=v(@field_displayname)=%% <br>",
"Field Type: %%=v(@field_type)=%% <br>",
"Field Required?: %%=v(@field_required)=%% <br>",
"Field Options: %%=v(@field_options)=%% <br> <br><br>",
"%%[ next @counter ]%%"
],
"exps": [
],
"def": "DescribeMscrmEntityAttributes(S1)",
"type": "function",
"cat": "For Use With Microsoft Dynamics Crm",
"url": "http:\/\/help.exacttarget.com\/en\/documentation\/exacttarget\/content\/ampscript\/\u2026nctions_for_use_with_microsoft_dynamics_crm\/#DescribeMscrmEntityAttributes"
},
"Divide": {
"desc": [
"Returns the result (quotient) of dividing the first argument by the second argument."
],
"args": [
"N1 Value to be divided-the dividend.",
"N2 Value to divide by-the divisor."
],
"exps": [
"Given @abc=100 and @def=5",
"%%=Divide(@abc,@def)=%%",
"The system returns:",
"20"
],
"def": "Divide(N1, N2)",
"type": "function",
"cat": "Utilities",
"url": "http:\/\/help.exacttarget.com\/en\/documentation\/exacttarget\/content\/ampscript\/ampscript_syntax_guide\/utilities_ampscript_functions\/#Divide"
},
"Domain": {
"desc": [
"Returns the domain portion of an email address."
],
"args": [
"S1 Email address"
],
"exps": [
"%%=Domain(sales@example.com)=%%",
"The system returns:",
"example.com"
],