I have a script that will read a CSV file, and update a record. One of them is a dropdown list. So after updating the record, I would like to check if the changes were saved. I compare the values from the CSV and read the values on the page. For dropdowns, what I end up getting in the variable is the dropdown value, instead of the label. Is there an easy way to read the label instead?
Using storeValue, I’m getting the index (2). I’m hoping to be able to store the value instead (Investigating) because what I have in the CSV source is “Investigating”. My goal is to check:
${varTaskStatus} == ${varCSVTaskStatus}
Right now, that’s
2 == Investigating
so it won’t match.
If not possible, is there a one-line javascript you can suggest where I can convert my index ID to a corresponing label (something like a VLOOKUP in Excel).