I am working on a process that allows a user to enter an order using an editable

Certified Senior Developer
I am working on a process that allows a user to enter an order using an editable grid. Using the SAIL Recipes as an example, I created 2 SAIL Rules. One contains the editable grid (psh_itemRows.txt) and the other is the main expression (psh_enterOrder.txt) that calls it. In my editable grid, the user can enter multiple rows and the system calculates the suggestedPrice value based on the user-entered values for 'quantity' and 'unitPrice'. All data is saved in the CDT (which is set to 'multiple') except for the calculated value. I'd also like to display the subtotal in the psh_itemRows.txt form so the user knows how much the total is as he/she is entering line items, but haven't been able to get that to work (probably because the suggestedPrice calculation is not being saved). At the very least, I need to show the subtotal on the main form. Any suggestions? I've attached my SAIL forms.

psh_enterOrder.txt

OriginalPostID-223011

OriginalPostID-223011

  Discussion posts and replies are publicly visible

Parents
  • @judym In that case, would you please be able to remove the dollar function everywhere(in the calculations being made in 'saveInto' attribute and from the 'value' attribute of editable fields) and store the calculated values directly without any further formatting? Please do let me know if you need any assistance in terms of code.

    A problem I could see as of now is, the fields into which you are trying to store values into, are of type Number Decimal whereas the values which you are trying to store are of type Text. You might find success in storing a Numeric value into a field of type Text but the vice-versa may cause an weird behavior and lead to erroneous results as far as my knowledge is considered. So I would suggest refraining from making use of fn!dollar() function which actually converts the numeric value to text.
Reply
  • @judym In that case, would you please be able to remove the dollar function everywhere(in the calculations being made in 'saveInto' attribute and from the 'value' attribute of editable fields) and store the calculated values directly without any further formatting? Please do let me know if you need any assistance in terms of code.

    A problem I could see as of now is, the fields into which you are trying to store values into, are of type Number Decimal whereas the values which you are trying to store are of type Text. You might find success in storing a Numeric value into a field of type Text but the vice-versa may cause an weird behavior and lead to erroneous results as far as my knowledge is considered. So I would suggest refraining from making use of fn!dollar() function which actually converts the numeric value to text.
Children
No Data