Smart Import trigger procedure - how to select based on the items present in the import ?
Hi all,
I'm faced with an interesting issue when using Smart Import.
We have setup an object so that users can import values from an Excel file.
This is in addition to a screen where they can enter manually the values.
In the basic data entry screen (based on layout then), there is a trigger which executes a currency conversion procedure (very basic), and then the procedure writes in a text "log" cube, to indicate that the value was updated by @user on @datetime.
We use the same procedure in the smart import trigger. The problem is, in this case, the procedure uses the selection of the screen where the smart import is, and it is not selecting the coordinates of the objects that the user actually updated during his file import.
As a result, the data perimeter updated by the procedure is much larger than planned. It is not a big issue for the conversion (the data gets converted again, not a big deal since the result is the same), but now the user who did the smart import is "logged" on every cell of his perimeter, instead of just the celles where he uploaded an update.
Is there a way to select in a smart import trigger only the cells included in the imported file ?
In fact, I'm looking for the "reverse" option compared to the new data entry trigger option called "Execute procedure for active selection".
Thanks for your suggestions :)
Etienne
Accepted Answers
-
Hello Etienne,
Now I got better now the problem you have. Perhaps you can add a dimension like "User" to that cube, it would only be filled for the user in question? That dimension should be unique and done automatically by the security features of Board. Still, it could be a fragile option as admin users could have no selection on that "User" axis. Also, to complete my previous comment, you can force the value as 1 for your buffer cube inside the Smart Import configuration.
You may know this one: A reliable option, although longer to implement, would be to work with Blob cubes. You could give your users a template and let them load CSV files so you can extract the data. The data readers will work with Temporary cubes.
Hope that helps.
Lucas0 -
Hi Lucas, thanks for the idea of a "user" dimension. This might be workable since we already use such a dimension in access rights control, I'll give it a try.
User dimension + temporary cube cleared at the end of the procedure to manage the selection should be close to a selection based on the smart import content itself.
Etienne
0
Answers
-
Hello Etienne,
Reading this I had an idea, not sure of how if it works though:
What if you use a Buffer cube to the Smart import and oblige the customer to add a "1" to make the import? In that way you could use the buffer to make your selection inside the trigger procedure and then clear it after using. You can still create your members with the add new member. The Smart import should refuse the import if the value is missing.
Let me know!
Cordialement,
Lucas
0 -
Hi Lucas,
Thanks for the suggestion ! It's something I thought about. The issue is indeed to manage the concurrency in the procedure ; since I cannot use a temporary cube in the smart import, I'd need to select based on a cube that might have been filled with several smart imports made by several users on the same perimeter, and so the selection would be impacted. Your suggestion to clear the cube at the end would certainly help, but it's not 100% error-proof in a concurrent environment.
Indeed several users might use the smart import on the same perimeter/selection (due to the specific organization).
Any other thoughts ? @Board team, any plan to have a selection of the trigger based on the crossings of the smart import ?
0