Okay here’s the details:
See that ‘Pay part from unpaid’ tab?
It when clicked, gives an option to enter the amount rather than automatically update the amount the bill had, should I had chosen a full bill payment option. Like this:
The bill numbers are shown by valid_if expressions from a main table where users enter the bill details when bills reach respective project sites. One condition in that valid if is the bill status has to be ‘Unpaid’. When I choose to pay bills in full, (i.e. the scenario in the second image) the status of the bill goes from unpaid to paid in the main table. @Steve assisted me greatly in figuring out that.
Now there are times when I don’t want to pay bills in full but only a part of them. For that I incorporated the mechanism.
Now the valid_if is set up perfectly, it shows the unpaid bills to choose from. (But here the type is enum as opposed to enumlist in the ‘full payment scenario’ as it doesn’t make sense to pay multiple bills in part).
Theres a field below that lets me enter the amount that I want to actually pay. It gets added to the bill amounts, had I chosen any full bills to pay and an action navigates me to the main expense form.
Now I want to mark the corresponding status in the main ‘bill form’ from unpaid to partially paid and update the partial payment amount in a column. That requires a grouped action, one to mark the bill from unpaid to partially paid, and the other to update the payment amount.
It would be worthy to mention that I had already been running another grouped action to mark unpaid bills to ‘paid’ and navigate to company expense form.
Now the new actions (that I would like to fire only when I’m partially paying bills) have a behavior when the condition is true that “Partial payment option” is equal to “Pay part from full” (See 1st image).
The action to set the partial payment amount in the main “User bill submissions” table is:
The closeup of the area marked in red, i.e. the expression:
The terms in the expression will make sense if you look at the very 1st image in this post.
The column “Computed” is a virtual column which is the concatenation of the “Bill Number” and “Bill Amount”.
I now grouped these two actions into one.
And used this action as a referenced action in the main “user bill submissions” table.
The ‘referenced rows’ expression is (this is something that @Steve helped me out with earlier. I just copied)
And finally make another grouped action:
The 3rd action is a group of the other three. The navigation action is at last.
While the action to mark bills from Unpaid to Paid and navigating to company expense form was running correctly, I can’t get this new set of actions to work. It doesn’t even mark the bills from unpaid to partially paid.
I hope this is enough information. I am happy to provide more if needed.