record producer variable reporting

Ravish Shetty
Tera Guru

hi all

which is a table where the variable to value information is stored for requests created using record producers?

1 ACCEPTED SOLUTION

The Machine
Kilo Sage

The question_answer table is where its at.

View solution in original post

10 REPLIES 10

Thanks for taking the time to reply. I tried to keep my example simple, but perhaps it's not a great example after all. I understand what you're saying now about why, in my previous example, changing the Category
(after submission) on the Incident form wouldn't update that category value in the question answer table.


Here's a more real world example of my true scenario...

We have a record producer based on a custom table named u_my_custom_table (extended from task table) and it has a variable named u_middle_name. This record producer variable is mapped to that same field in u_my_custom_table.

When the request form is first submitted, middle name is 'Brian'. There is an insert for this value (Brian) into both the question answer table and u_my_custom_table. The data is in two tables at this point.

After submission, a fulfiller notices the middle name is incorrect and updates it to 'Steve'. This update gets applies to the u_middle_name variable on u_my_custom_table, but it still shows as 'Brian' in the question answer table.

I don't understand the purpose or the point of a record producer essentially inserting into 2 tables on the submit, especially if the values in the question answer table don't get updated if they're changed after the submit.

If the values in question answer are not updated and kept current, why would someone look to the question answer table for these values?

Hoping you can help me make some sense of record producers in general and more specifically the purpose of the question answer table.

Thanks,
James

So first thing you have to realize is that Catalog Items and Record Producers turn TWENTY years old this year.  They were ideas to solve a problem, and at that time here was the main problem:
"How do we make a request system such that we don't end up with tables with one column for every potential question ever asked"

At the time we were coming from Remedy and Magic Total Service Desk systems where we could have HUNDREDS of columns in a table because "some workflow somewhere needs this one question".

I would encourage you NOT to think of it as "record stored in two places".   Record Producer variables (and their associated answers) aren't MEANT to be full columns.  Just info we collect that we transform into the ticket somehow.

It is NOT expected behavior that the mapping between a variable and a similarly named column will be bi-directional for every update in the system.   Its ONLY there for the insert.


That's awesome you have taken the time to discuss this with me. 

I think you've basically confirmed the behavior I'm seeing... record producer variable values in the question answer table do NOT get updated at any point after the insert.

I saw other posts where people suggested to look at the question answer table for the values and for reporting but that seems like a bad idea to me if I know the data in that table was just for the insert and it may be stale data at a later time.

Thanks again, 

James

You CAN change question answer values by putting the variable formatter on the form.  What DOESN'T happen is some kind of e-bond between a variable and a similarly named field.  The vast majority of the time, your variables aren't going to map directly to a column in the table anyway... so that's why being able to report on them is critical.

Like in my coaching cohort I always have my students make a "Financial Consequence Incident".
We ask if the incident affected revenue, expenses, or both.
We then ask the user to estimate the financial effect.
We further ask them if they've seen this kind of thing before.

All three of those questions don't have a valid map to a specific Incident column.
I use the Record Producer script to build my own nicely formatted description.
I report off the variables when necessary them anyway.

This video I made might help you as well...
It covers the use of variables for both condition building as well as reporting.

Once again, thanks for your explanation of that question answer table and record producer variables in general.

At this point, I'll go ahead and share a full explanation of why I was asking about the purpose and use of the question answer table...

We have a record producer that is quite large (many variables) and most of these variables in our case are mapped to fields on the table.  This is contrary to what you have said about mapping variables to table fields, but I suppose it just depends on the use case.  

I've been asked to build a custom approach that will allow our fulfillers to resubmit these requests.  Sometimes requests can get canceled due to time constraints and sometimes there is just human error which results in the need for a request to be resubmitted.  Since the request form itself is a long one, our users naturally don't like hearing they need to resubmit their request.  So, we want to allow our fulfillers to resubmit the original request on behalf of the requester in some cases.

As I was doing the work on this, I noticed that when the request was submitted the default behavior is to insert a row into the question answer table along with the custom table the record producer is based on.  But, any changes to that variable data after submission weren't recorded in the question answer table.  So, I started to wonder if my custom approach also needed to insert into the question answer table, which is how I found this post in the forum.

At this point, I'm trying to implement this approach for this resubmit functionality.  If you look at the code, you can see that it does insert into the question answer table, so I guess I will be inserting into the question answer table after all.