I would like to know if the following behavior is expected or unexpected when trying to calculate a value using a Pulldata return and a user input integer/number value. In short, I have a S123 Connect published form where I am trying to calculate a "total cost" value based on a user input of "hours" and a constant "per hour cost" value that is derived from an ArcGIS Online feature layer table and queried using the Pulldata function.
My initial attempt at performing this calculation was to multiply the Pulldata value ("per hour cost") and the user input value ("hours") in the same row/record/function. While this seemed to validate as intended in the S123 Connect preview, when published to ArcGIS Online the calculation wouldn't operate correctly and instead just returned the "per hour cost" value.
In my second attempt I created a "null"/temporary field to store the "per hour cost" from the Pulldata function and then used this "null"/temporary field in a second calculation of the "hours" X "per hour cost" to achieve the "total cost" I was looking for. This seemed to work as I intended and the values were calculating correctly.
Is it not possible to use the Pulldata function as a part of a larger calculation? EX: Pulldata(a,b,c) * ${fieldName}
Attempt 1 - Calculate "Total Cost" in one row
(pulldata("@layer", "getValue","attributes.PerHourCost","https://services5.arcgis.com/.../LineItemPrices_tbl/FeatureServer/0", "TypeOfCost = 'Work' and Name = 'UTV_With_Pumper_Sprayer'")) * ${Equip_UTV_Hours}
Attempt 2 - Calculate "Total Cost" in two rows:
Row 1 "Rate" - field is "fieldType" null:
pulldata("@layer", "getValue","attributes.PerHourCost","https://services5.arcgis.com/.../LineItemPrices_tbl/FeatureServer/0", "TypeOfCost = 'Work' and Name = 'UTV_With_Pumper_Sprayer'")
Row 2 "Total Cost":
${Rate} * ${Equip_UTV_Hours}
Solved! Go to Solution.
pulldata likes to be in its own field. You can then use that field in a calc but no you cannot combine pulldata inside a calc at all. So make 3 fields. 1 for each pulldata and one for the final multiply calc.
pulldata likes to be in its own field. You can then use that field in a calc but no you cannot combine pulldata inside a calc at all. So make 3 fields. 1 for each pulldata and one for the final multiply calc.
Doug,
Thanks for confirming this behavior.
Nice info