What I am doing seems pretty simple, but somehow I am not able to get the sequence of events or settings for the elements to do what I am looking for.
All are working in a repeat group where the fields involved include a count, reorder_count, inventory_status and status.
What I am doing is determining the status of both the inventory status and status based on a comparison between count and reorder_count.
If reorder_count is less then Count I want the values to be inventory_status = 'Stocked' and status = 'Closed'
If reorder_count is greater then Count I want the values to be inventory_status = 'New Request' and status 'Open'
To explain what happens, we have 5 locations where they do what we refer to as counts. When employees enter counts they are adding a new records to the repeat group and entering how many of that item they have. As indicated above the count is compared to the reorder count to determine if more of that item needs to be ordered or not.
Based on the status being set we have another form that a manager uses that only shows items that have a status of 'New Request'. Once an item is ordered the inventory_status is set to ordered, allowing employees to see that the item has been ordered.
When the item comes in the employees will then go in and mark the item as received.
Finally to monitor lead times and determine if a store has received items that have been ordered the manager will look for any items that have been marked as received and close the out removing them form all list seen by the employees or managers.
The reason for this design is for a single system for employees to put in counts that covers 5 locations and a single manager who is responsible for ordering all items for 5 locations.
THE PROBLEM: I can get the status to set but but am having issues with the calculate element resetting or clearing both status each time reorder_count and count are evaluated. I need to find a way to only set the status for new repeats and not touch any previous or already saved repeats.
All are working in a repeat group where the fields involved include a count, reorder_count, inventory_status and status.
What I am doing is determining the status of both the inventory status and status based on a comparison between count and reorder_count.
If reorder_count is less then Count I want the values to be inventory_status = 'Stocked' and status = 'Closed'
If reorder_count is greater then Count I want the values to be inventory_status = 'New Request' and status 'Open'
To explain what happens, we have 5 locations where they do what we refer to as counts. When employees enter counts they are adding a new records to the repeat group and entering how many of that item they have. As indicated above the count is compared to the reorder count to determine if more of that item needs to be ordered or not.
Based on the status being set we have another form that a manager uses that only shows items that have a status of 'New Request'. Once an item is ordered the inventory_status is set to ordered, allowing employees to see that the item has been ordered.
When the item comes in the employees will then go in and mark the item as received.
Finally to monitor lead times and determine if a store has received items that have been ordered the manager will look for any items that have been marked as received and close the out removing them form all list seen by the employees or managers.
The reason for this design is for a single system for employees to put in counts that covers 5 locations and a single manager who is responsible for ordering all items for 5 locations.
THE PROBLEM: I can get the status to set but but am having issues with the calculate element resetting or clearing both status each time reorder_count and count are evaluated. I need to find a way to only set the status for new repeats and not touch any previous or already saved repeats.