1. Hannu Pikkarainen
  2. PowerBuilder
  3. Thursday, 28 September 2023 20:46 PM UTC

Hi, 

I have a problem that needs support from this community.

I have developed a program for cost allocation. Users create allocation rules how to devide original costs in accounting into smaller units (counter units, producst groups, projects, etc)

Users can change these rules (about 5-10 t rules) and I can record these changes. 

I can create solution where user can asks, what has happened for rule for this compination of original parameters (2-8) fields.

How can I create a window showing the difference of two settings (comparison level of input 2-8 levels could be changed, same with output levels 2-8), rows could be added, changed or deleted.

 So I need a way to dind difference with two datasets. All ideas will be appreciated.

 

BR, Hannu

 
 

 

Accepted Answer
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Friday, 29 September 2023 12:28 PM UTC
  2. PowerBuilder
  3. # Permalink
Maybe by saving them to temporary files and then use a tool like WinMerge (or fc.exe from windows) to get and show the differences?
Comment
There are no comments made yet.
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Friday, 29 September 2023 12:28 PM UTC
  2. PowerBuilder
  3. # 1
Maybe by saving them to temporary files and then use a tool like WinMerge (or fc.exe from windows) to get and show the differences?
Comment
There are no comments made yet.
Hannu Pikkarainen Accepted Answer Pending Moderation
  1. Friday, 29 September 2023 08:51 AM UTC
  2. PowerBuilder
  3. # 2

That is exactly what I was going to do. My problem is that when I have snapshots of these rules, each containing several thousand rows, how can show differences between them. Updating these rules is usually done by deleting all old ones and importing new rules.

Comment
  1. Hannu Pikkarainen
  2. Friday, 29 September 2023 09:26 AM UTC
That is not good. I need to provide this view of differences to user directly in our application.
  1. Helpful
  1. Miguel Leeuwe
  2. Friday, 29 September 2023 09:33 AM UTC
Well Hannu, then you'll have to write your own code to show/compare differenctes.

Good luck.
  1. Helpful
  1. Miguel Leeuwe
  2. Friday, 29 September 2023 09:47 AM UTC
Maybe there are Online comparision tools that you can use in a webbrowser control
  1. Helpful
There are no comments made yet.
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Friday, 29 September 2023 08:40 AM UTC
  2. PowerBuilder
  3. # 3

Maybe I don't understand what you mean exactly, but to me, it sounds like you need to create a "history" table. Any time a change is done, you populate that table. You can do that using triggers for delete, update and insert.

regards.

Comment
  1. David Peace (Powersoft)
  2. Friday, 29 September 2023 09:27 AM UTC
As Miguel said, you need to record the changes in a new table, if you are deleteing and re-insterting then this will not be possible. What you need to do is load your data into a separate tempory table then process form that in the following way:

1. Compare your new data with the old data and delete any rows that are missing in your new data, log these deletions to the audit table.

2. Compare your new data with the old data and update existing rows that now have different values, log these updates to your audit table. If this is a new row then insert into the data and log this in your audit table.



That should give you the Audit trail that you require. The auditing can be achieved through database triggers.



I hope that helps.
  1. Helpful 1
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.