This might be a long shot but is there a way that we can add a date stamp to a record when it appears in a BAQ?
Context: I make my BAQ, which I turned into a Dashboard and SSRS report. The purpose of this report is to track if there is a demand/job created and the material is not issued, a record will be added to this BAQ. In turn, when the issue of material takes place, it will no longer appear in this BAQ.
So back to my question, is there a way for me to track when a record first appeared in my BAQ? Kind of like a datestamp? If this is not doable in BAQ, how about a workaround solution with BPM? Or is there something I can do on the SSRS platform? Any insight is very much appreciated!
I did this by adding a ud field to the BAQ table, then added a bpm to update the field on update with todays date.
The baq screen is not customizable, so I made a quick search to find baqs by date modified.
That would datestamp the BAQ. I think @dnguyen wants to datestamp the data the BAQ returns.
@dnguyen - The BAQ results aren’t persistent, meaning that each time the BAQ is run, the prior results are purged and new results are retrieved. You could add a Calc field to contain the date and time of when the BAQ was run. But this would be updated every time the BAQ is run. If your output is a BAQ Report you could include that field in the report, so the printed report would have the datetime the data was generated.
If you made the BAQ updateable, you could add a BPM directly to it using the advanced BPM Update. In that BPM you could check if this field is blank and if so, update it with the current date and time. You would have to add a UD code to contain this to one of the tables involved to hold this field.
What @TDray said is the way you would have to go with it. I think that the difficulty is where are you doing to store the date stamp? Is there is single table that this would make sense to have a datestamp for? If there is, add a UD field to that table. If not, you’re going to probably need to use a UD table in which the keys are a combination that links it to a row in your BAQ. In your BAQ you would bring in that UD table and link it by the keys. The next step for both methods is to use the advanced BPM update and put a BPM on post-processing with Get List. Then you write your code to date stamp where it goes (obviously only when the row has no date).
@dnguyen JobMtl would be the table to add the UD field to. Make the BAQ updateable and in GetList add a check for an empty or null date then set to now and write back to JobMtl. If you want to track how long it exists on the list you could add another date field and set that in a bpm when issued complete is set true