Hi All,
I am trying to use import excel to database smart service (Excel tool plugin) for storing data in database. but its throwing me error in log file like :
Cannot retrieve the value for key "Unknown column '' in 'field list'" from the bundle.is anybody faced this issue? if yes, then please let me know the solution.
Discussion posts and replies are publicly visible
H Sandeep,
1. Check your CDT, have any column of type multiple
2. Check the Keys, I think you are giving wrong key value for storing.
Regards,
Bhanu.
Hi Bhanu,
column name and mapping is correct only. this smart service is working now for me when i provide value in attribute "New Columns" and "New Columns Values". But this attribute is optional, it should work without this also.
Hi Sandeepr,
Could you please tell me, what values to be given to "New Columns" and "New Columns Values"
Hi,
in "New Columns" you should give column name of you table and in "New Columns Value", the value which you want to store.
Hi Sandeepr00003,
If the values that i want stored in the database are in the excel document, how should we get this smart service to work ?
Hi Sandeepr373,
did you have to parse the excel and then supply the data as a cdt into the "new column values" parameter of the smart service ?
Trick is the to remove the last column in your excel file and use it under "New Columns" with it's value under "New Column Values".
For example, in my CDT, the last column is always "isActive". Now when I would want to import Excel to database, I will not include "isActive" column on excel file, rather, I will input "IsActive" as Value under 'New Columns' and "1" as value under 'New Column Values'.
As sandeepr373 mentioned, these were supposed to be optional fields, however, the node fails if they aren't populated, for some reason.
Keeping rest of the parameters as desired, the node should pass. It worked for me considering below:
thanks asimrasool it worked for me by following the instructions you specified
@asimrasool Your comments were very helpful. I have faced similar issue. though the trick worked, i have date and datetime fields in my data. which are nullable fields. It Appears excel is expected to source these values even though i have marked the columns as nullable in DB. has anyone faced a similar issue?
Note: I even tried entering null and blank values for these columns.
My design looks like this
1. Let user upload either an Excel or a CSV.
2. Export and Stage this data in DB.
3. prompt user with loaded tabular data and confirm the modification.
3. update/Modify reference tables based on the staged data.
Thanks,
Sai Manam
This thread is a few years old - but issues like this are why I always recommend using the fn!readExcelSheetPaging() function within the same Excel Tools plugin - that way you can create an expression rule to pull the raw Excel data and map it to the CDT yourself, performing any manipulations, empty checks, etc, and then simply use the Write to Data Store Entity to persist the CDT to the DB.
Hi Chris, Could please suggest , without use of CDT because we are using 22.4v and implementing write to record smart service.