Hi, I have been experiencing an issue where I am trying to save the v

Hi,

I have been experiencing an issue where I am trying to save the values that are calculated automatically in an inline editable grid but they are not being saved in a variable. I've tried using all the functions to save those values but they're not getting saved anywhere.

for example, If I calculate amount through quantity*price then quantity and price are getting saved but not the Amount.

a!textField(
label: "amount " & ri!index,
align: "RIGHT",
readOnly: true,
value: if(or(isnull(ri!items[ri!index].qty), isnull(ri!items[ri!index].unitPrice)), null,
dollar(tointeger(ri!items[ri!index].qty) * todecimal(ri!items[ri!index].unitPrice))),
saveInto: ri!items[ri!index].amount
)

So Can anyone help me saving auto-populated values in a grid?

Thanks,
Varnika

OriginalPostID-209066

OriginalPostID-209066

  Discussion posts and replies are publicly visible

Parents
  • @varnikam One way to resolve this is to push the values into 'amount' field in the 'saveInto' of 'quantity' and 'price' provided if you are going to interact with quantity and price fields for sure.

    And with regards to behavior, yes, that's an expected behavior. You can't save values into a variable until and unless you interact with a component and that's how SAIL works. That is, you can't save the values into 'amount' until and unless you interact with it. At a high level I understand that 'amount' is a field used for display purpose, and that's why I have been suggesting to update the 'amount' field's value when you interact with other fields namely 'quantity' and 'price'.
Reply
  • @varnikam One way to resolve this is to push the values into 'amount' field in the 'saveInto' of 'quantity' and 'price' provided if you are going to interact with quantity and price fields for sure.

    And with regards to behavior, yes, that's an expected behavior. You can't save values into a variable until and unless you interact with a component and that's how SAIL works. That is, you can't save the values into 'amount' until and unless you interact with it. At a high level I understand that 'amount' is a field used for display purpose, and that's why I have been suggesting to update the 'amount' field's value when you interact with other fields namely 'quantity' and 'price'.
Children
No Data