0

Check Code syntax

Hi, Does this code look OK? Basically it checks if the code exists, compares two prices and update a field with the lowest, for all products in the system.

Thanks Matt

 

do as server
for i in select Products do
let mySKU := i.SKU;
let myAUSale := i.'AU Price Amazon (AUD) Sale';
let myAUNorm := i.'AU Price Amazon (AUD)';
let myAUUpload := i.'AU Price Amazon Import (AUD)';
if first(select Products where text(SKU) = i.mySKU) != null then
if myAUSale > 0 then
myAUUpload := myAUSale
else
myAUUpload := myAUNorm
end
end
end
end

1 reply

null
    • Alain_Fontaine
    • 3 yrs ago
    • Reported - view

    I would like to help, but I need to understand what you are trying to do.

    Is there a mySKU field in the table?

Content aside

  • 3 yrs agoLast active
  • 1Replies
  • 564Views