How is your experience with the OutSystems Community?
14
Views
2
Comments
common template for esupport message
Question

Hi All,

I want to build some auditlogmnessage in general for each screen blocks or popup combined , If user add all new fields first times the message should appera as name: ABC (Added) ,If it contains picklist ex country and if we select India then all picklist option text to be passed ,Ex 

Name:ABC

 Country:Indial

If It contains List structure ex Country list and based on country tax,

Then it should show  Countr:India (Added)

                                       Tax: Tax1 Added

Similary for update case only the modified value ex Country :India->Japan(Modified)

Similary for Removed 

I have developed javascript commpn function which accespts newjson,oldjson label,list,Picklist lables and compares and provided output ,but for each use case i need to customise it,as they need proper labels,the picklist selected option text and not the value,

Please suggest if there is common teplate to do this

2026-05-21 04-48-12
Deepa Tiwari

Hi @Preeti zade ,

I would suggest not relying completely on custom JavaScript for this.

Instead, create a generic Audit Log component using OutSystems Structures and reusable Actions.

You can keep the comparison logic generic and pass the following as configuration:

  • Old Record / Old JSON
  • New Record / New JSON
  • Field Configuration – Field Name, Label, Type
  • Picklist Configuration – Value and Display Text
  • List Configuration – List Name, Unique Key, and fields to audit

The generic logic can then handle:

  • Added → Name: ABC (Added)
  • Modified → Country: India → Japan (Modified)
  • Removed → Country: India (Removed)
  • List records Added/Modified/Removed
  • Picklist/Reference IDs → Display Text

This way, the comparison logic remains the same for all screens, Blocks, and Popups. Only the configuration/metadata changes based on the use case.

I would also recommend returning a List of structured Audit Items rather than directly generating a text message. You can then have a separate reusable Action to format those items into the required audit message.

This will make the solution much easier to maintain and reuse across the application instead of creating/customizing JavaScript for every screen.

Regards
Deepa

UserImage.jpg
Preeti zade

Hello,

I am passing the same with i have created the generic function client actions which accepts old json newjson

n list structure and returns the audit ,currently it is working but I want to handle this input from each use case ,forming picklisr option text,and all their Json to pass to some local Javascript which will add into list and passing that to generic.

So some customisation I need to do on each screen as the expected  test is label value in case of ticklish option text and all.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.