73
Views
12
Comments
Solved
I want to display changes made to a record
Discussion

Hi,

I'm a beginner in Outsystems. I want to have a log each time someone makes changes to a record, but it's not displaying correctly.

What am I doing wrong?

I have added the OAP file.


Thank you for your time

JD's Warehouse.oap
2019-05-22 11-30-09
Marcelo Ferreira
Solution

Hi Gambit,

I did some changes in your code and I leave it in attachment. What you want to accomplish should be done with this pattern.

Regards,

Marcelo

JD's Warehouse.oap
2018-08-10 10-26-29
Anuar Abdullahi

Marcelo Ferreira wrote:

Hi Gambit,

I did some changes in your code and I leave it in attachment. What you want to accomplish should be done with this pattern.

Regards,

Marcelo

Thank you Marcelo for changing the Entities as well the code, which created an error when creating a new product.


2018-05-31 18-44-19
Ravi Vakkalanka

Hi

Please try with saving the product value also in your Changes table. And then fetch the values in the edit screen.

2019-05-22 11-30-09
Marcelo Ferreira
Solution

Hi Gambit,

I did some changes in your code and I leave it in attachment. What you want to accomplish should be done with this pattern.

Regards,

Marcelo

JD's Warehouse.oap
2018-08-10 10-26-29
Anuar Abdullahi

Marcelo Ferreira wrote:

Hi Gambit,

I did some changes in your code and I leave it in attachment. What you want to accomplish should be done with this pattern.

Regards,

Marcelo

Thank you Marcelo for changing the Entities as well the code, which created an error when creating a new product.


2018-06-01 06-26-35
kirit guntuk

Hi Gambit Play,

If you want to display the previous saved number in the record, then it should have column saving the record of the previous value, as soon as you check there is a change while updating the record, you can save the previous value in a column or log entity based on your requirement.

Thus while updating the record the previous value needs to be updated and can be displayed in the front end using the added column.

Thanks


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

A discussion about change logs wouldn't be complete without a link to the Human Readable Change History Forge component.

2018-08-10 10-26-29
Anuar Abdullahi

Thank you all for taking the time to help me :).

2019-05-22 11-30-09
Marcelo Ferreira

Hi Gambit,

Which error are you getting? because I tested it and I was able to create products with no problem.

Regards,

Marcelo

2018-08-10 10-26-29
Anuar Abdullahi

Marcelo Ferreira wrote:

Hi Gambit,

Which error are you getting? because I tested it and I was able to create products with no problem.

Regards,

Marcelo

Hi Marcelo,

I was getting error when creating a "Product", but that has been resolved. 

I do have one more question. How do I get the User name to display in the "Last changes"


I have added a OAP file in the attachment. 

Thank you for your time.

Bees Burgers - Warehouse - v1.oap
2018-05-31 18-44-19
Ravi Vakkalanka

Hi Gambit

You should just add the "UserID" foreign key (From Users Table) into the Changes table. 

Thanks

Ravi

2018-08-10 10-26-29
Anuar Abdullahi

Ravi Kumar Vakkalanka wrote:

Hi Gambit

You should just add the "UserID" foreign key (From Users Table) into the Changes table. 

Thanks

Ravi

Hi Ravi,

The "Changes" table has been renamed to "ProductVersion" and as you can see in the oap file I already did add UserId as a foreign key. I tried different things but does not seem to work.


Thanks


2019-05-22 11-30-09
Marcelo Ferreira

Hi,

You are missing to assing GetUserId() to ProductForm.Record.ProductVersion.UserId

Regards,

Marcelo



2018-08-10 10-26-29
Anuar Abdullahi

Marcelo Ferreira wrote:

Hi,

You are missing to assing GetUserId() to ProductForm.Record.ProductVersion.UserId

Regards,

Marcelo



Thank you very much, Marcelo.


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