So I use the validateListing event to fire off a script that writes today’s date and current BIN price to the private comments field. This gives me a history of dates/prices at relists/restarts.
Works well except when there is an error, I’ll then get a duplicate entry on the subsequent successful launch.
Therefore I want to enclose my script in a no-error routine.
Question: How do I check that there are no errors? I think I check that the errors array is empty but not sure how to do it within the validateListing event. Probably something simple but can’t figure it out.
Thanks in advance for any help and insights.
Oh very good question! Also want to know, because I have several scripts that make arbitrary changes to listing text.
Does it make a difference if you let the script always clear the private comment field before it inserts the date/price?
Here’s an example from one of my listings. I want to keep the history and just append to it. My script does the append ok, but will write a duplicate entry if an error is found and i have to “re-validate” ( if that makes sense. )
I see. Maybe you can change your script to only append the date/price IF the date/price doesn’t exist already?
I hadn’t thought of that approach. Thank you, I will give that a try.
If you want, feel free to share your script in the “GarageSale Scripts” category. The script might be useful for others as well.
Ok I shared it here. thanks again, Dave
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.