Multi Drop down error in grid ?

Hello everyone,

Facing issue to display multi dropdown in editable grid. I want to display the interface having editable grid in record.

rows: a!forEach(
items: ri!purchaseDetails['recordType!{42faad32-9822-4aa3-903a-13045e657d3b}PMT Purchase Details.fields.{items}items'],
expression: a!gridRowLayout(
id: fv!index,
contents: {
a!textField(
label: "Description " & fv!index,
value: ri!purchaseDetails['recordType!{42faad32-9822-4aa3-903a-13045e657d3b}PMT Purchase Details.fields.{items}items'],
saveInto: fv!item.description
),
a!dropdownField(
label: "Category " & fv!index,
placeholder: "--- Select ---",
choiceLabels: { "Office Supplies", "Personal", "Other" },
choiceValues: { "Office Supplies", "Personal", "Other" },
value: ri!purchaseDetails['recordType!{42faad32-9822-4aa3-903a-13045e657d3b}PMT Purchase Details.fields.{items}items'],
saveInto: fv!item.category
),
a!integerField(
label: "Qty " & fv!index,
value: ri!purchaseDetails['recordType!{42faad32-9822-4aa3-903a-13045e657d3b}PMT Purchase Details.fields.{items}items'],
saveInto: fv!item.qty
),
a!integerField(
label: "Unit Price " & fv!index,
value: ri!purchaseDetails['recordType!{42faad32-9822-4aa3-903a-13045e657d3b}PMT Purchase Details.fields.{items}items'],
saveInto: fv!item.unitPrice
),
a!integerField(
label: "Amount " & fv!index,
value: ri!purchaseDetails['recordType!{42faad32-9822-4aa3-903a-13045e657d3b}PMT Purchase Details.fields.{items}items'],
saveInto: fv!item.amount
),
a!richTextDisplayField(
value: a!richTextIcon(
icon: "close",
altText: "delete " & fv!index,
caption: "Remove " & fv!item.description & " " & fv!item.category,
link: a!dynamicLink(
value: fv!index,
saveInto: {
a!save(
ri!purchaseDetails['recordType!{42faad32-9822-4aa3-903a-13045e657d3b}PMT Purchase Details.fields.{items}items'],
remove(
ri!purchaseDetails['recordType!{42faad32-9822-4aa3-903a-13045e657d3b}PMT Purchase Details.fields.{items}items'],
save!value
)
)
}
),

the above code throwing error in record

  Discussion posts and replies are publicly visible

Parents
  • Hi,

    It looks like the value you are displaying (from your record) does not match one of the possible choiceValues.

    This seems to be because what you have under 'value' is the entire set of record fields inside 'items', while what you want to display is actually PurchaseDetails.items.Category, for instance.

    At the end of this...

    value: ri!purchaseDetails['recordType!{42faad32-9822-4aa3-903a-13045e657d3b}PMT Purchase Details.fields.{items}items']

    you should add yet another '.fields.' and then select the desired item field. 

Reply
  • Hi,

    It looks like the value you are displaying (from your record) does not match one of the possible choiceValues.

    This seems to be because what you have under 'value' is the entire set of record fields inside 'items', while what you want to display is actually PurchaseDetails.items.Category, for instance.

    At the end of this...

    value: ri!purchaseDetails['recordType!{42faad32-9822-4aa3-903a-13045e657d3b}PMT Purchase Details.fields.{items}items']

    you should add yet another '.fields.' and then select the desired item field. 

Children