Attempting to emulate Excel's VLookup on a fillable PDF form
- December 21, 2022
- 1 reply
- 2136 views
I attempt to mimic Excel's VLookup on a multipage form with input tables on some pages. On the Products page table, there are two columns of fields, pStyle and pRate, where the user inputs data. There are three field columns on the Uniform Order page table: uStyle, uIssue, and uWklyRate. On the Uniform Order page, I have already scripted a function for the uStyle fields to provide a dropdown list of what the user inputs in the pStyle fields (field names prefixed with LstGrp.) I need to pull the pStyle's corresponding pRate to multiply by uIssue into uWklyRate. All of the fields have corresponding row numbers (i.e., pStyle.1, pRate.1, etc.) With my limited experience, I have seen a line of code that makes sense to use to capture the row number in a for loop - var oFld = this.getField(this.getNthFieldName(i)) - but don't see the use for a for loop in this instance. My first step, though, is to locate uStyle's dropdown selection pStyle row number, look on that same row for the pRate, pull the value into the calculation in uRate. Any help would be appreciated. I have attached the form.
