Extract each csv record using jquery/javascript

This code should extract different record level, but it shows the same record.

script: |
var dataSet = $data("testdata/testdata_loyalty/Data_Tibco_Loyalty_user.csv")
dataSet.forEach(function ($dataRecord) {

$runMacro("macros_loyalty/Find_Loyalty_Customer",{
$description: "Find customer on Tibo site for Loyalty",
data: $dataRecord})

$runMacro("macros_loyalty/Loyalty_Adjust_Points",{
$description: "Adjust Points for a customer",
data: $dataRecord})
})

The csv has several rows of data.
But what it is doing, is the same action for only the first user.
For example. if row one is (dan, 100) and row 2 is (sally, 200). it will do dan, 100 twice

Is there anyone who has solved this issue before?

I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (’).

Thanks, Jeremy.
I will consider this afterwards.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.