The Update Persisted Attribute Values job is an important part of Rock’s system that helps keep your data accurate and up to date. Let’s take a moment to explain what’s happening behind the scenes. We’ll talk a little about databases and SQL (a tool for managing data). Don’t worry if you’re not familiar with these terms—you don’t need to be an expert to use Rock. But having a basic understanding might help if you ever need to troubleshoot something. Take the Baptism Date as an example. This is an attribute you might use in Rock, and all it does is store a date. Simple, right? Well, behind the scenes, Rock stores that date in a format that the system can understand. For example, if Ted Decker was baptized on January 12, 2006, Rock saves it as 2006-01-12T00:00:00.0000000. This format helps Rock organize and process data, but it’s not very user-friendly. Note that for certain attribute types, like Group (which displays the group’s name when you see it in Rock), the persisted values are automatically updated when the underlying data changes. This means that if you change a group's name, the persisted attribute values will be updated to reflect the new name. To make it easier for you to read dates, Rock also saves them in a simpler format (like 1/12/2006) using something called the PersistedTextValue and PersistedHtmlValue. This is the format you’ll see in reports or on pages in Rock. Using these persisted values makes Rock faster by eliminating the need for additional formatting steps. When you use a persisted value, it's already in a ready-to-use format, saving you time and ensuring the dates you see in Rock are formatted consistently. Rock also has something called PersistedCondensedTextValue and PersistedCondensedHtmlValue, which are shorter versions of the same information. In the case of dates, though, the condensed and regular formats are usually identical since dates are already short. Now, here’s where things can get tricky: if you make changes to data using SQL (which we recommend avoiding), the dates displayed in Rock might not update correctly. For example, if you changed Ted’s baptism date from 1/12/2006 to 12/1/2006 using SQL, the system will still show the old date. This happens because Rock’s persisted values (the ones that make dates easy to read) don’t update automatically when you use SQL. That’s where the Update Persisted Attribute Values job comes in. This job scans for anything out of sync and fixes it. It knows what to update by checking a setting called IsPersistedValueDirty. If this setting says '1,' it means Rock needs to make an update. If it says '0,' everything is fine. If you do use SQL to change values, make sure you update the IsPersistedValueDirty property to '1.' This tells Rock’s job to correct the persisted values so everything stays accurate. But what happens if someone forgets to make that additional update? Rock has a solution for that too. The Update Persisted Attribute Values job has a setting called Rebuild Percentage, which updates a percentage of the records, even if the IsPersistedValueDirty setting isn’t triggered. By default, this ensures all records get reviewed and updated every four days, just in case.