Logging Interface Access

I hope this message finds you well.

I would like to log the event of an interface being opened.
However, my understanding is that on the interface itself, unless an action such as clicking a button occurs,

it is not possible to write a record or start a process model.

When consulting ChatGPT, I received the following idea:

  1. Create a Web API on Appian that returns an image as the response and simultaneously saves a log.
  2. Place an image on the target interface and set the endpoint of the Web API created in (1) as the image source.
  3. As a result, when the interface is opened, the Web API in (1) is called, and the log is recorded.

However, it seems that the function a!writeToDataStoreEntity does not get triggered inside the Web API.

I have two questions and would appreciate your advice:

  1. What should I review to implement the above ChatGPT idea successfully?
  2. Are there alternative methods to log when an interface is opened?

Thank you in advance for your kind advice.

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Senior Developer

    Keizo,

    Create the Web API as a POST but make sure that you check the Queries Data and not Modifies data.

    - The webAPI must create an entry onto the database table where you are logging the event.

    Create an integration to call that webAPI

    In your interface, call the integration

    a!localVariables(

    local!eventLog: rule!MY_Integration(),

    a!sectionLayout(

    label: "My Label",

    contents: {}

    )

    )

    This should work. Let me know if you got any questions

    Lejanson

Reply
  • 0
    Certified Senior Developer

    Keizo,

    Create the Web API as a POST but make sure that you check the Queries Data and not Modifies data.

    - The webAPI must create an entry onto the database table where you are logging the event.

    Create an integration to call that webAPI

    In your interface, call the integration

    a!localVariables(

    local!eventLog: rule!MY_Integration(),

    a!sectionLayout(

    label: "My Label",

    contents: {}

    )

    )

    This should work. Let me know if you got any questions

    Lejanson

Children