Taking you back to basics again.
We have a custom form that updates client details. For each submitted form, we’d like to have a list of what elements were changed. How would you go about this?
I couldn’t solve this, so I started with an inefficient solution that turned to a bust.
For each column that points to a change, I added an ITE column. ITE results in a description of the change if changed column is not empty.
A template is used to join all ITE columns
How do I clean up this template column?
Because we don’t always update all client details, the template will almost always contain too many white spaces. Sure, The summary can be trimmed, and any double whitespace can be replaced with nothing. This doesn’t provide a coherent summary of changes. It would be great to add commas between ITE values, at the very least.
In the template column, I also thought about replacing the whitespace with a placeholder, such as “XXX”, but I again couldn’t bring it to be clean enough.
Back to my first sentence, I know it’s a very basic question and I’m sure the answer will be mind-blowingly simple
Can you show what your IF columns look like?
How are you determining a change in value?
Does the form update an existing row, or add a new row?
Can you show an example of what the template result should look like if it worked the way you want it to?
The form is sitting in a standalone Glide table, all USC. That table is bridged to the main client table. It’s basically overwriting the values in the clients table, after checking if there was indeed a change in each value.
Assuming the users updated the following:
The summary should be:
“First name, Phone number, Address”.
BTW - I have thougut about changing the summary template to one line per potential change, but I’m not sure if that would help. Something like this:
Instead of what I now have which is 0 1 2 3 4
If it’s OK with you, I’d like to just to the next step of this same use case: how to display the “change report” to the user.
The custom form is adding a row to a table serving as a “Change log”. I’m using a “list relation” component inside the client details screen. Clicking on this will lead us to a cards view of the changes made to that client. Now, clicking on any of these cards will take us to a new screen with the details of such a change. The issue I have now is how to show changes side-by-side, and show only the changes. i.e. - no need to show values that haven’t changed. This log table has both the updated values and the previous values. What I did now is have two “action text” for each value: previous and updated. These are visible only if the “updated” is not empty.
Needless to say, this looks bad.
I would love to have this with an inline list, but how do I refer the inline list to a single row? I’ve found this great post by @Jeff_Hager , but it seems like an overkill…
The other component I would be happy to use is a basic but here I have two challenges: 1. Need a 3rd column (Name of change, previous, updated). 2. It will show a line even if updated value is empty.
Based on your visual example here, here’s a quick visual example from MS-Word. This is how the user should see it.
erm, that doesn’t look like it’s going to scale very well to me.
Let me think about this a bit more. Assuming that you’re okay with a HTML table, then I think the best approach would be to build the rows for that table at the time the change is made, and write them as a template to a single column.
So in effect, your Change Log table would end up with just a handful of columns:
Who made the change
That last column would contain the HTML table definition for all columns that were changed.
While I’m not sure I understand your proposal in full, it does sound as way to complicated for a simple visual aid.
If was thinking earlier about the Array options in Glide, but these seem to be complicated as well. By “complicated” I’m not referring to the setup process (although it could be easier), I’m referring to the day-to-day operations later on and the chances for something going wrong when you have to jump through so many hoops to reach such a simple view.
Another option I was thinking about is JS, but again, too much hassle.
My primitive solution of a double action item per each value is much more stable I think. But it looks like a piece of software from an era long forgotten