Hi There
I have a form(As per img1 attached) that has a Table with 2 columns in it, One is "department "(Drop Down Field) and the other is "filledField"( single line field).
The Drop Down field is being filled via a lookup Rule(no condition, just a fill). This is from a MSQL database with all the departments listed here. The filledField is also a lookup rule but will only return 1 result based on the condition rule.
When the filled column is populated with data , the Drop Down list should auto select the matching value.
I have attached the code i am using. The strange thing is that this code works if the Drop Down list is not a lookup value i.e. the drop down options are set when creating the drop down field(As per img2 attached).
$(document).ready(function () { $('.cf-table-block').change(grabVal); }); function grabVal() { $('.cf-table-block tbody tr').each(function () { var s = $(this).find('.filledField input').val(); $('.dropDown').find('Option[value="' + s + '"]').prop('selected', true); }) }
Not sure how to make the drop down select the correct value when it has a lookup rule.
Any Ideas Please?
Reagrds
Farren