25
Views
5
Comments
Save data in Join tables
Question
Application Type
Reactive

Hi everyone,

These are the entities in my library module where I want to save Log data:

I want to create a Log_Save action in this library which is supposed to be called from different places in my application to gather the logs and save in these tables.

For each specific Log row, I want to save for example multiple rows for saving the Attribute_Name and Attribute_Value!

Would you please help me with what logic I should implement to do this for me?

2026-04-28 22-49-39
Julio Weber

Is this something you after?

Please, let me know if this is in the correct way and I can share the OAP for you.

Regards,

2024-04-15 01-01-11
Fatemeh Safinia

Thank you so much Julio, would you please share the file?

2026-04-28 22-49-39
Julio Weber

Find attached.

Hope it helps you.

Log Library.oap
2024-04-15 01-01-11
Fatemeh Safinia

Now I want to call this action for saving Log from inside an action in my application that I have this input:

I want to pass the 4 highlighted attributes to the LogAttribute table and save them as below:
Attribute_Name: "RequestType"
Attribute_Value: GetRequestType(RequestTypeId).RequestType.Label

Attribute_Name: "DeliveryOption"
Attribute_Value: GetDeliveryOption(DeliveryOptionId).DeliveryOption.Label

Attribute_Name: "Department"
Attribute_Value: GetRequestDepartment(DepartmentId).RequestDepartment.Label 

Attribute_Name: "ApplicantPostalCode"
Attribute_Value: ApplicantpostalCode

Do you may help how I can create a List out of this in this action?

2020-09-15 13-07-23
Kilian Hekhuis
 
MVP

Hi Fatemeh,

If the action has an input that's a list of the Attribute structure, you can just add them to a local list with ListAppend, that you then pass as input to the Log action, or you can expand the input parameter list and fill in the values directly.

The most difficult thing will be, I think, to make it dynamic: you want to know which values changed and log only the changed values. There are several ways you could go about this, but I fear that, given the level of your questions, this is way beyond your skills at the moment.

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