saving multiple rows in database

Certified Associate Developer

I have a multiselect dropdown with names h1, h2 and there respective ids are 123,456. the interface is to update the codes in site.But when I am selecting both values from dropdown and adding the code, code is not getting added for both the values. It is only getting added for the first value(h1) which I selected initially in the dropdown(h1)

  Discussion posts and replies are publicly visible

Parents Reply Children
  • 0
    Certified Associate Developer
    in reply to Shubham Aware

    a!forEach(
    items: local!selectedInsuredId,
    expression: a!localVariables(
    /* Find the index of this party to resolve its applicationId */
    local!idx: index(fv!item,
    wherecontains(fv!item, local!insuredParty['recordType!{f953bbb6-0363-40ce-afe7-4fd0315e1fc0}UWG Party.fields.{19291ea5-16a7-4ddb-9fc9-dbd77b0f9b3e}id']),

    null()
    ),
    /* Construct a new UWG MIB Reporting Code row */
    'recordType!{a705bdd4-5853-4575-bf26-39f58fbcb25a}UWG MIB Reporting Code'(
    'recordType!{a705bdd4-5853-4575-bf26-39f58fbcb25a}UWG MIB Reporting Code.fields.{42e0ad63-0ba5-42bf-bf62-feff961f8d11}applicationId':
    index(local!insuredParty['recordType!{f953bbb6-0363-40ce-afe7-4fd0315e1fc0}UWG Party.fields.{0b7cc71a-9085-4b8d-8173-d3fb2dfcaeed}appianApplicationID'], local!idx, null()),
    'recordType!{a705bdd4-5853-4575-bf26-39f58fbcb25a}UWG MIB Reporting Code.fields.{b7e4ad0f-8daa-4d4e-bdff-38c77b595b2a}mrcIsMibReportingCodeValidated': false,
    'recordType!{a705bdd4-5853-4575-bf26-39f58fbcb25a}UWG MIB Reporting Code.fields.{36931678-bcb8-43ba-abd3-9f09fa9ec90e}partyId': fv!item,
    'recordType!{a705bdd4-5853-4575-bf26-39f58fbcb25a}UWG MIB Reporting Code.fields.{5a73b0fe-cee4-4d8f-b9d5-cc3a7a574644}createdOn': now(),
    'recordType!{a705bdd4-5853-4575-bf26-39f58fbcb25a}UWG MIB Reporting Code.fields.{4ea74402-050f-4d34-b459-3ae196ba1c73}createdBy': loggedInUser(),
    'recordType!{a705bdd4-5853-4575-bf26-39f58fbcb25a}UWG MIB Reporting Code.fields.{da86ac28-b1d2-41c3-ab2b-11af8f8b9c24}updatedOn': now(),
    'recordType!{a705bdd4-5853-4575-bf26-39f58fbcb25a}UWG MIB Reporting Code.fields.{a1ee9757-ddda-4f4c-a659-68c1d6ebbfe8}updatedBy': loggedInUser(),
    'recordType!{a705bdd4-5853-4575-bf26-39f58fbcb25a}UWG MIB Reporting Code.fields.{ed97db33-4b1a-458d-bd65-f33878fa9879}isActive': true
    )
    )
    )
    ),

  • 0
    Certified Associate Developer
    in reply to Shubham Aware

    I wasnot able to share code. when I am pasting the actual code It is being determined as spam