When I Bootstrap Data from Excel, how can I import a column as an entity identifier?
For example, I want to update my Bootstrap action to handle a third Excel column FWStatusId, which is an identifier in the FWRole entity. The first two columns are just Text.
Name Description FWStatusId Analyst asdf sadflj oij Accepted
You must run a query to convert the label that you get from Excel into an entity identifier.
You can always change the behavior of the Excel bootstrap operation to handle entity changes you need to perform after using our scaffolding mechanism.
In the example below, we had an Excel spreadsheet with expenses, and now we want to add a column to register the expense status, either approved or rejected.
First, we add the new column ExpenseStatus to the Excel_Expenses structure. Excel_Expenses was created previously by the previous scaffolding mechanism.
Now we need to update the bootstrap operation ho handle the new column. The bootstrap timer is on the processes tab, which maps to the actual action on the logic tab.
Now we need to convert the label that we get from Excel into an actual identifier.
- We use an aggregate to run a query on the ExpenseStatus entity.
- We configure a 1 minute cache on the aggregate to avoid repeated queries during the record loop.
After getting the correct identifier, we just need to add the ExpenseStatusId to the assign operation. All the columns of the Excel worksheet are now correctly mapped and stored into the entity.
The eSpace attached has all the details: