Skip to main content
skender.kollcaku
Employee
November 30, 2022
Solved

What's the best choice to save loading date/time of an interface?

  • November 30, 2022
  • 8 replies
  • 1 view

Hi everyone,

For audit purposes in a ticket management process, I need to track create/update/delete actions on a Ticket (record type) each time it has been opened the relative interface and track timing (basically: startEvent, endEvent).
I already track the interface initial loaded date/time in a local variable using now(), but how to pass it to a rule input (and therefore use it in the create/update process)? I think I have to use a!save in the primary button, but I am missing low-code details.

Do you have any suggestion?
Thank you so much,

Best answer by mikes0011

What are you trying to save it into?

If you have a field in a CDT you're writing, you would just do an a!save() like you said, as in like, "a!save(ri!myCdt.createdDateTime, local!loadingTime)".

8 replies

stefanhelzle0001
Brainy
November 30, 2022

Your button has a saveInto parameter which takes a list of a!save() to be executed as the button is clicked. Now you can store any values in your rule inputs.

skender.kollcaku
Employee
November 30, 2022

Thank you also Stefan! Both suggestions were right as they were the same. ;)

mikes0011
mikes0011Answer
Brainy
November 30, 2022

What are you trying to save it into?

If you have a field in a CDT you're writing, you would just do an a!save() like you said, as in like, "a!save(ri!myCdt.createdDateTime, local!loadingTime)".

The Expression Guru
skender.kollcaku
Employee
November 30, 2022

Thank you for your immediate help.

Here I share the "Create Ticket" interface primary button configuration:

a!buttonWidget(
        label: "Create",
        submit: true,
        style: "PRIMARY",
        value: local!intLoadTime,
        saveInto: { a!save(ri!loadTime, local!intLoadTime) }
      )


where loadTime is a Date/time rule input and the local!intLoadTime has been initialized at the beginning of the form with now().

Was it what you meant?

mikes0011
Brainy
November 30, 2022

ri!loadTime is.. a boolean?

You will need to change that RI to dateTime type, if you want this to do anything useful.

The Expression Guru