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
  • 0
    Certified Senior Developer
    Sikhi - I'm still having refresh issues with these rules. When the user goes back to the main screen (form), The ri!newRIP_cdt.clinSubtotal value is displayed (subtotal of the line items costs' which is captured in the preceding script task). The user is then tasked to enter values for handling and freight charges:
    ri!newRIP_cdt.totalEstimate = ri!newRIP_cdt.handlingCost + ri!newRIP_cdt.freightCost + ri!newRIP_cdt.clinSubtotal
    ri!newRIP_cdt.handlingCost is calculated using the ri!newRIP_cdt.handlingRate * ri!newRIP_cdt.clinSubtotal OR the user can overwrite the handling cost value.
    Issues:
    1. If I enter a handling rate, the handling cost is properly calculated and ri!newRIP_cdt.totalEstimate value updates.
    2. If I overwrite the handling cost value, the ri!newRIP_cdt.totalEstimate value does not update.
    3. When I enter a freightCost, the ri!newRIP_cdt.totalEstimate value does not update.

    I updated the totalEstimate value in the other parameters' 'saveInto' section as you suggested previously but I must be missing something. Can you take a look at my code? (This is just a portion of the form but it includes the SAIL code for these fields).

    Values Not Refreshing.txt


Reply
  • 0
    Certified Senior Developer
    Sikhi - I'm still having refresh issues with these rules. When the user goes back to the main screen (form), The ri!newRIP_cdt.clinSubtotal value is displayed (subtotal of the line items costs' which is captured in the preceding script task). The user is then tasked to enter values for handling and freight charges:
    ri!newRIP_cdt.totalEstimate = ri!newRIP_cdt.handlingCost + ri!newRIP_cdt.freightCost + ri!newRIP_cdt.clinSubtotal
    ri!newRIP_cdt.handlingCost is calculated using the ri!newRIP_cdt.handlingRate * ri!newRIP_cdt.clinSubtotal OR the user can overwrite the handling cost value.
    Issues:
    1. If I enter a handling rate, the handling cost is properly calculated and ri!newRIP_cdt.totalEstimate value updates.
    2. If I overwrite the handling cost value, the ri!newRIP_cdt.totalEstimate value does not update.
    3. When I enter a freightCost, the ri!newRIP_cdt.totalEstimate value does not update.

    I updated the totalEstimate value in the other parameters' 'saveInto' section as you suggested previously but I must be missing something. Can you take a look at my code? (This is just a portion of the form but it includes the SAIL code for these fields).

    Values Not Refreshing.txt


Children
No Data