You need to sign in to do that
Don't have an account?

Hi I am setting picklist value in table format. How do i pass the selected picklist value to salesforce in lightning. Please help
<td class="slds-truncate">
<select>
<option value="">Please select</option>
<option value="xxx">xxx</option>
<option value="yyy">yyy</option>
<option value="zzz">zzz</option>
</select>
</td>
<select>
<option value="">Please select</option>
<option value="xxx">xxx</option>
<option value="yyy">yyy</option>
<option value="zzz">zzz</option>
</select>
</td>
Greetings to you.
As you are using HTML tag to display picklist you can use below line of code to get the selected value from the picklist.
Component:
Controller:
If you use <lightning:select> then you can use below code to get the selected value from the picklist.
Component:
Controller:
I hope it helps you.
Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future.
Thanks and Regards,
Khan Anas
It is working fine for single record if i am selecting the picklist value for more than one record getting below error
Uncaught Action failed: c:FFSearchComponent$controller$ReqTypechange [component.find(...).get is not a function]
ReqTypechange : function(component, event, helper) {
var pickReqTypeval = component.find("RequestTypePicklist").get("v.value");
console.log('reqtypevalue-'+pickReqTypeval);
},
UpgTierchange : function(component, event, helper) {
var pickUpgTierval = component.find("UpgradeTierPicklist").get("v.value");
console.log('pickUpgTierval-'+pickUpgTierval);
},