Avatar

Level 2

Hi Linda,

Thanks for your response ..

Below is the full context behind this XML script ..

I have a workflow which identifies the products purchased by each customer   and ranks the spend on each product.

Then there is a delivery ,which presents the products as per their spend (Rank) and the products they haven’t purchased from a list (below are the products).

The products I am looking for are : ("FOOD","BINS & LINERS","BEVERAGES AND SWEETNERS","CATERING SUPPLIES","BATHROOM & KITCHEN PAPER","CLEANING CHEMICALS & EQUIPMENT","APPLIANCES")

Example: a customer might only purchase three products FOOD, CATERING SUPPLIES & CLEANING CHEMICALS & EQUIPMENT ..  the delivery needs to have these three products as well as the remaining products he has not purchased from the list .

This customer has purchased three products and I have the order , what I trying to do with the JS is : fill in the blanks with the remaining products ..

So customers remaining products should be BINS & LINERS, CATERING SUPPLIES, CLEANING CHEMICALS & EQUIPMENT, APPLIANCES 

I am using an array in the JS to do this , the array works as per the requirements .. however I am unable to write the values which are stored in the array back in to the variables..