You need to sign in to do that
Don't have an account?
Ragula Sivakumar
Hi All, I have a requirement to input some values for the fields and then select one file as CSV/Excel . Once you select and in upload file the records should created along with the input values in the fields. Can you help me how to achieve this .
Hi All,
I have a requirement to input some values for the fields and then select one file as CSV/Excel .
Once you select and in upload file the records should created along with the input values in the fields.
Can you help me how to achieve this .
I tried below but initial level i am getting error
I have a requirement to input some values for the fields and then select one file as CSV/Excel .
Once you select and in upload file the records should created along with the input values in the fields.
Can you help me how to achieve this .
I tried below but initial level i am getting error
<template>
<lightning-card icon-name="custom:custom19" title='Credit card information uplaod'>
<div class="slds-m-around_medium">
<lightning-layout-item size="6" padding="around-medium">
<lightning-input type="number" name="Importid" required label="Importid" value={impnum}
onclick={handlechange} style="width:200px" >
</lightning-input>
</lightning-layout-item>
<lightning-layout-item size="6" padding="around-medium">
<template if:true={Programvalues.data}>
<lightning-combobox
name="Program"
label="Program value"
value={Programvalue}
placeholder="-Select-"
options={Programvalues.data.values}
onchange={handleselect} style="width:200px"></lightning-combobox>
</template>
</lightning-layout-item>
<lightning-layout-item size="6" padding="around-medium">
<template if:true={AXvalues.data}>
<lightning-combobox name="AXPvalue"
label="AxPID"
value={Axvalue}
placeholder="-Select-"
options={AXvalues.data.values}
onchange={handleselect} style="width:200px" ></lightning-combobox>
</template>
</lightning-layout-item>
</div>
</lightning-card>
</template>
JS:
import { LightningElement,wire,api } from 'lwc';
import { getPicklistValues } from 'lightning/uiObjectInfoApi';
//import { getObjectInfo } from 'lightning/uiObjectInfoApi';
//import CREDITCARD_OBJECT from '@salesforce/schema/Credit_card__c';
import PROGRAMM_Field from '@salesforce/schema/Credit_card__c.Choose_Program_Reason__c';
import AXPID_Field from '@salesforce/schema/Credit_card__c.AX_PID__c';
//import {ShowToastEvent} from 'lightning/platformShowToastEvent';
//import insertdata from '@salesforce/apex/importdata.readCSVFileInsertMember';
export default class Uploadfilewithinput extends LightningElement {
impnum ="";
@api Programvalue="";
@api AXvalue="";
// @track success;
// @track failure;
//@api recordId;
handlechange(event){
this.impnum=event.target.value;
}
// @wire(getObjectInfo, { objectApiName: CREDITCARD_OBJECT })
// objectInfo;
@wire(getPicklistValues, { recordTypeId: '$objectInfo.data.defaultRecordTypeId', fieldApiName:PROGRAMM_Field})
Programvalues;
@wire(getPicklistValues, { recordTypeId: '$objectInfo.data.defaultRecordTypeId', fieldApiName: AXPID_Field})
AXvalues;
handleselect(event){
if(this.event.name ==='Program'){
this.Programvalue=event.target.value;
}
if(this.event.name === 'AXPvalue'){
this.AXvalue=event.target.value;
}
}
}