function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
DolgoldyDolgoldy 

How to add value in picklist field using aura

Hi all,
New to aura component. want to add "Digital " value in Sbu picklist field using aura plz help in below code
<!-- attribute to hold the SBU-Interaction Type value-->
    <aura:attribute name="headerValue" type="string" default="" /> 
    
    <!-- attribute to hold the SBU Boolean value-->
    <aura:attribute name="isAviation" type="Boolean" default="false" />
    <aura:attribute name="isLPG" type="Boolean" default="false" />
    <aura:attribute name="isGas" type="Boolean" default="false" />
    <aura:attribute name="isLubes" type="Boolean" default="false" />
    <aura:attribute name="isRetail" type="Boolean" default="false" />
    <aura:attribute name="isI_C" type="Boolean" default="false" />
		
    
    <!--Aura Init function-->    
    <aura:handler name="init" value="{!this}" action="{!c.doInit}" />
    <lightning:workspaceAPI aura:id="workspace" />
    <lightning:navigation aura:id="navService" />
    <ltng:require styles="{!$Resource.largeModal}" />
    <ltng:require scripts="/support/console/34.0/integration.js" />


    <!--case Creation Popup Window-->
    <div class="slds-modal__container">
        <header class="slds-modal__header HeaderCss">
            <h2 id="modal-heading-01" class="slds-text-heading_medium slds-hyphenate" >Interaction</h2>
        </header>
        <div class="slds-modal__content slds-p-around_medium" id="modal-content-id-1">
            <lightning:spinner aura:id="mySpinner" alternativeText="Processing.." title="Processing.." variant="brand"
                               size="large" class="slds-hide" />
            <lightning:recordEditForm aura:id="myform" onerror="{!c.onError}" onload="" onsubmit="{!c.handlesubmit}" onsuccess="{!c.handleSuccess}" objectApiName="Case">
                <aura:if isTrue="{!v.showError}"> 
                    <c:ToastError visible="{!v.showError}" contents="{!v.errorMessage}" />
                </aura:if>
                <!--Screen 1 Details-->
                <div aura:id="firstsection" class="{!if(v.displayedSection == 'section1','slds-show','slds-hide')}">                 
                    <!--<c:ToastError visible="{!v.showError}" contents="{!v.errorMessage}" />-->
                    <!--SBU-InteractionType-->
                    <div class="slds-grid slds-gutters">
                        <div class="slds-col slds-size_6-of-12">
                            <lightning:inputField fieldName="SBU__c" value="{!v.Case_Record.SBU__c}"
                                                  aura:id="SBUField" required="true" onchange="{!c.getHeaderValue}" />
                        </div>
                        <div class="slds-col slds-size_6-of-12">
                            <lightning:inputField fieldName="Interaction_Type__c" value="{!v.Case_Record.Interaction_Type__c}" 
                                                  aura:id="Interactiontypefield" required="true" onchange="{!c.getHeaderValue}"/>
                        </div>
                    </div>
 
Sai PraveenSai Praveen (Salesforce Developers) 
Hi,

Are to looking to display the picklist dynamically in Aura component?

If so can you check the below example.

https://developer.salesforce.com/forums/?id=9062I000000g92jQAA
https://wedgecommerce.com/display-picklist-values-dynamically-in-lightning-component-using-apex/

Let me know if you face any issues.

If this solution helps, Please mark it as best answer.

Thanks,