Setting up an attribute rule on Update, with the intent that an edit in this feature class will find and change a row in a table. Think in terms of trying to track when a valve or a circuit in a system is temporarily changed from its normal setting - trying to track ones that have been changed and when they go back to normal. The "change" portion of the process has been implemented successfully in a different rule. This is intended to find a row in the table with the GlobalID from the feature class and a Temp Start Time, but no Temp End Time - the edit will "close out" that record by fill in the Temp End Time.
Errors are coming from line 21 of this screenshot, with the message: "Indexable type expected."
Filtered_table is a featureset(think feature class). You need to call First to get first record or loop over it.
Is that still necessary when there's only one record in the table? The FeatureGID in the table matches the GlobalID from the feature class + the table record with a null date in that field - should be unique. Phrasing it another way, think like the table is tracking a light switch being flipped off (and tracked on TempStartDate in the table) and flipped back on (TempEndDate) - we shouldn't have instances where we come into an unlit room and flip the light switch off again.
Edit: I tried adding another variable. On line 16 above, insert the line "var match_table = first(filtered_table)" . I then changed the global id reference on line 21 to be "match_table.GlobalID". It yielded a different error message: Invalid Function arguments.
I tried adding another variable. On line 16 above, insert the line "var match_table = first(filtered_table)" . I then changed the global id reference on line 21 to be "match_table.GlobalID". It yielded a different error message: Invalid Function arguments.
Post your code as a code snippet using JS as formatter. Will make it easier to provide feedback