Select to view content in your preferred language

Inventory counter

294
1
09-13-2024 01:12 PM
Labels (1)
JayHodny
Frequent Contributor

Howdy! I am trying to create a series of inventory counters in ArcGIS Dashboards on ArcGIS for Enterprise 10.9.1.  The inventory is of refuse carts of three types recycle, trash and yard waste, each having up to three sizes (35, 45, and 95 gallons).  I was considering starting with a supply of carts, a number, then subtract from it each time a cart of that type and size is pulled from inventory and the delivery is completed.  For example, I have 100 95 gallon recycle carts (R95).  I pull three from inventory and deliver them.  I would like a counter that shows 97 R95 carts remain.  Each time I pull a R95 cart(s) from inventory, the count decreases.  We use Survey123 Connect to record and manage the various cart transactions.  I have a Delivery Complete field (yes, no) in the Survey form.  My thought process was to use Arcade, sum the number records for Delivery Complete (=Yes), filtered by cart type and size, and subtract that count from the starting inventory value for that cart type and size.  As the Delivery Complete value increases, the remaining cart count decreases.  Does this approach make sense?  If yes, I am struggling with coding the idea in Arcade.  Or is there another way to achieve a dynamic inventory count?

0 Kudos
1 Reply
JayHodny
Frequent Contributor

I think I have this figured out.  In this example, I have a starting inventory of 188 95 gallon recycle carts. I pulled seven carts from inventory and the result is 181 remaining.  The Indicator element is filtering the cart type, cart size and cart transaction where carts are pulled from inventory and delivered to residents.

var difference = 188 - $datapoint["count"]

return {
middleText: difference
}

0 Kudos