Skip to main content

Is there a way to get the previous value of an item after it was modified?

I am working on a calendar and the user will input several values in the form such as Title, Schedule and so on. What I would like to do is get the previous value of those fields after it was modified. This is an example:

 

TitleOld ScheduleNew Schedule
Router Maintenance5:00PM6:00PM

 Should I create a new column that is PreviousTitle, Old Schedule and so on that will auto populate when they try to modify the event like the table below the only editable is the New Schedule and the Old Schedule is constant base on the last entry of the user.

TitleNew ScheduleOld Schedule
Router Maintenance3/10/2017 6:00pm3/10/2017 5:00pm

Or if you have any suggestion can you please elaborate it further because I'm really new to this kind of environment

This is a link to one of my question but I accidentally change the action to answered so I ask again so that other can see my question.

https://community.nintex.com/thread/15474-collecting-events-on-a-specific-date-or-the-present-day

Dear

For Getting previous value of a "Title" as example, you can do the below:

1-Create a new column named "PreviouTitle"

2-In the Nintex Form, create a calculated value connected to "PreviousTitle"

3-Add this Formula to the calculated Value: Formula Builder

If(not(equals({ItemProperty:Title},Title)),{ItemProperty:Title},{ItemProperty:PreviousTitle})

Where Title in red reference to the "Named Controls" Title in the form.

Cheers... happy.png


Hi Philip,

Thank you that really helps me a lot. But do you have any suggestion when I want to get the previous value of a Date&Time. Because I noticed that it cant be connected to the calculated value form control.


Also, Additional question after I apply those changes and when I start to edit it again the form seems to froze and I cant click any button on the window. it looks like this.


Concerning the Date, also there is no problem:

You need to create a column of type single line of text called "PreviousDate" and use the below formula in another calculated value as per the previous example for "Title":

Nintex Forms Designer - Empty - Item

If(not(equals(Date,{ItemProperty:Date})),formatDate({ItemProperty:Date},"d"),{ItemProperty:PreviousDate})

Where Date in red reference to the "Named Controls" Date in the form.


Concerning the frozen form, it's not a related issue, If you need any help, send me the form as attachment.


Hi Philip,

I already attached the file please feel free to check it if your not that busy. Thank you!


Dear, 

1-I tried the form on my machine, it's working.

   Please try a system generated form and let me know the result.

2-Concerning "Getting the previous value", please let me know if the answer was correct and suits your needs.


Hi Philip,

I also tried it again and it worked. But sometimes it is unclickable maybe a 70% chance of working. How can I get a system generated form? do you mean the default one? Sorry for asking those questions because I am really new to the nintex form. Also regarding the previous value. should I just remove the formatDate if I want to get the data and time? because I checked the available formats for formatDate() and there is no date and time given.


Also I've got another question. Is there a way to create a calculated value in the list setting? because there is a calculated type in the columns but the formula only allows to insert a column and there is no Name Controls. Because when I am using the default generated form it work 100% all the time.


Hi Philip,

Thank you for your help. I already resolve the issue. The issue is on the css of the form. The value of the z-index of the overlay is higher than the z-index of the content that's why it's blocking the form. I resolve it by custom javascript.

Here is the code:

NWF.FormFiller.Events.RegisterAfterReady(function(){var dialog = window.parent.document.getElementsByClassName('ms-dlgContent')[0].style.zIndex = 1511;});


Dear,

There is calculated value in  list settings, but with Nintex forms calculated formula you can do it in more easier and advanced way.


Reply