Write a row to DB on UI load?

Certified Lead Developer

I would like to have an interface that, when it is accessed/loaded/refreshed by user, will write a row to a table in the database.

Is this possible?

 

Idea: Perhaps by using a!writeToDataStoreEntity, or a!startProcess? But it seems that these do not work outside of a "button click" by the user. Trying to add it outside of a button is giving me errors like this one:

Could not display interface. Please check definition and inputs. Interface Definition: Expression evaluation error : Cannot create context for UI expression. Reason: A value of type "Reaction Tree" was stored in the variable "write", but values of this type cannot be stored in SAIL context variables. Use a with() variable or change the type of this value.

Thank you in advance for any ideas or advice!

  Discussion posts and replies are publicly visible

Parents Reply
  • I'd be more interested in what the actual use case is. At my current client they want an audit log entry written each time someone navigates to a Record Summary and/or any other Record related View. The instinct is to try and achieve what's described above but in actual fact Appian does write to an audit log these events (look in system logs/audit/records_usage.csv). This contains all the relevant details for these events and it then becomes a matter of extracting those events and dispatching/storing them as required.

Children