-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathchapter1.amp
More file actions
31 lines (24 loc) · 1.11 KB
/
chapter1.amp
File metadata and controls
31 lines (24 loc) · 1.11 KB
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
%%[
/*
Steps:
1. Define the Data Extension name, the attribute to fetch,
the attribute to search by, and the value to search for.
2. Use LookUp to perform the search and fetch the data.
3. Output the fetched value for use or display.
*/
/* Declare variables */
var @response, @dataExtensionName, @attributeToFetch, @attributeToSearch, @valueToSearch
/* Set the name of the data extension to be used */
set @dataExtensionName = "My_DataExtension"
/* Set the attribute to fetch from the data extension */
set @attributeToFetch = {{attributeToFetch}}
/* Set the attribute to search by in the data extension */
set @attributeToSearch = {{attributeToSearch}}
/* Set the value to search for in the given attribute */
set @valueToSearch = {{valueToSearch}}
/* Use the LookUp function to fetch the value of
the specified attribute based on the search criteria */
set @response = LookUp(@dataExtensionName, @attributeToFetch, @attributeToSearch, @valueToSearch)
/* Output the fetched response value */
OutputLine(v(@response))
]%%