I am creating the workflow for the travel imbursement.
The data entered in the interface is not being stored in the Database.
I am using latest version (26.3) of community edition India region.Can I get solution for this or alternate way for this.
Discussion posts and replies are publicly visible
if you are using a grid you could try something like this:
a!localVariables( /* Example data to load into the TravelReimbursement record type. Replace the field names with your actual record fields. */ local!dataToLoad: a!forEach( { a!map( employeeId: 1001, tripStartDate: today() - 10, tripEndDate: today() - 7, destination: "New York", amount: 850.00, currency: "USD", status: "Submitted" ), a!map( employeeId: 1002, tripStartDate: today() - 5, tripEndDate: today() - 3, destination: "Chicago", amount: 420.50, currency: "USD", status: "Submitted" ) }, cast( /* Use your travel reimbursement record type here */ recordType!TravelReimbursement, fv!item ) ),
/* Track whether we've already written the data */ local!submitted: false,
/* Refresh the grid data when local!submitted changes */ local!records: a!refreshVariable( value: a!queryRecordType( recordType: recordType!TravelReimbursement, fields: { /* Replace with your actual field references */ recordType!TravelReimbursement.fields.employeeId, recordType!TravelReimbursement.fields.tripStartDate, recordType!TravelReimbursement.fields.tripEndDate, recordType!TravelReimbursement.fields.destination, recordType!TravelReimbursement.fields.amount, recordType!TravelReimbursement.fields.currency, recordType!TravelReimbursement.fields.status }, pagingInfo: a!pagingInfo(startIndex: 1, batchSize: 50) ).data, refreshOnVarChange: local!submitted ),
a!formLayout( titleBar: "Travel Reimbursements", contents: { a!buttonLayout( primaryButtons: { a!buttonWidget( label: if(local!submitted, "Data Written", "Write Sample Reimbursements"), style: "SOLID", disabled: local!submitted, saveInto: { a!writeRecords( records: local!dataToLoad, onSuccess: a!save(local!submitted, true) ) } ) } ),
a!gridField( label: "Travel Reimbursement Records", labelPosition: "ABOVE", data: local!records, columns: { a!gridColumn( label: "Employee ID", value: fv!row[recordType!TravelReimbursement.fields.employeeId] ), a!gridColumn( label: "Destination", value: fv!row[recordType!TravelReimbursement.fields.destination] ), a!gridColumn( label: "Start Date", value: fv!row[recordType!TravelReimbursement.fields.tripStartDate] ), a!gridColumn( label: "End Date", value: fv!row[recordType!TravelReimbursement.fields.tripEndDate] ), a!gridColumn( label: "Amount", value: fv!row[recordType!TravelReimbursement.fields.amount] ), a!gridColumn( label: "Status", value: fv!row[recordType!TravelReimbursement.fields.status] ) }, pageSize: 10 ) }, buttons: a!buttonLayout( primaryButtons: a!buttonWidget( label: "Close", submit: true ) ) ))