data import
excel
7.14_()
sales



Is there a more verbose version of the import log available?  I'm on about the 5th iteration of trying to import a list from excel into contacts and I keep getting the same error message.  Don't know where the error is occurring or why.  I'm about at the end of my rope. 

Entirely useless error message below:

Conversion failed when converting from a character string to a unique identifier.

Like 0

Like

7 comments

Are you using the log at https://<instance>.bpmonline.com/0/Nui/ViewModule.aspx#LookupSectionModule/FileImportLookupSection/ExcelImportLog?  That one usually at least gives me the cell where the problematic data is.

If that's what you're using already, which columns are you importing into?  It sounds like one of them is an Id/GUID type column; is the input to that one in 00000000-0000-0000-0000-000000000000 format?  Does it have extra spaces, or is it perhaps missing the dashes (or depending on the converter's whims, does it have them when it's not expecting any)?

Darian Lewis,

Yes. That's the log I'm using.  I've done imports several times and it has never given me the cell where the data has gone wrong.  Perhaps you have some other configuration.  If so, please let me know what it is.  The lack of information is why I asked for a more verbose log.  I typed verbatim the message from the log in my original question.

 

I'm using the Account ID column.  This is so it doesn't overwrite the Account records we're adding the Contacts to.  I've tried trimming extra spaces via excel.  There are over 300 records in the original spreadsheet.  I'm pretty sure I could have entered them all manually in the time it's taken me to troubleshoot this.

 

 

Afraid I couldn't guess further without seeing a sample of the data.  Have you tried importing just one row to see if it's a single record causing the problem or all of them, and to test different ways of formatting the GUID in the column?

Darian Lewis,

Yes, I've done a few rows at a time and it worked.  Which is why I'd like to know exactly which of the records is causing the issue.  If I had that information from the import log, it would be helpful.  Hence the original question. I don't want to have to import all of these records a row at a time.  I shouldn't have to either.

What other ways of formatting the GUID would you suggest?  Would there be a preferred format for that field?

If individual records are working, then whatever format the functional ones are using should be fine.  Are there any blank/null entries in that column?  If so, I'd test one of those; it might be expecting all 0s instead.  If not, best I can suggest at that point is a binary search to narrow it down (i.e. import half the file; if there's an error, halve it again, if not, halve the other half and try that, repeat until you find the problematic row).

Might be someone else has a better idea.

Sorry, thought you worked at bpm'online.  I'll try taking this up with them.

Thanks

Dear Lisa, 

This error occurs when you are trying insert values of different type into string field. It is also possible that during the initial import there was a minor mistake in mapping of fields (which lead to the mentioned case) and when you've imported smaller portions the mapping was correct so the error didn't occur. 

You can try double checking the mapping of columns and importing the whole file once again. 

Best regards,

Dennis 

Show all comments
sales
7.14_()
excel
reports
help
ExcelReportBuilder

Hi community,

Can i generate a Excel report in a business process with de app in the marketplace?

I have a process wich function is sends a email with a attachment file, this is functional but the excel file cames empty.

Can anyone help?

King Regards!

Like 1

Like

9 comments

Dear Juan Cruz, 



We recommend you to contact bpmonlinelabs@bpmonline.com on this particular request as they are developers of this marketplace application.



Thank you. 

Hi Juan, How are you?

It may not be the best way but we made it work as follows:

  1.  Create a new source code
    1. Copy & paste IntExcelReportService
    2. Rename the class with our custom name
    3.  Add own code in the method we need to override in this case GetExportFilteredData

    var insert = new Insert(UserConnection).Into("AccountFile")

                .Set("Name", Column.Parameter(reportName))

                .Set("Data", Column.Parameter(buffer))

                .Set("Typeid", Column.Parameter("529bc2f8-0ee0-df11-971b-001d60e938c6"))

                .Set("Accountid", Column.Parameter("accountid");

            insert.Execute();

2.  Using RestSharp we made a process with a scrit task that atuhenticate in bpm and calls this new service in its 2 methods:

GetExportFiltersKey

GetExportFilteredData 

Regards

Hi Uriel,

 

We manage to develop the script task that stores the excel report in our custom object attachments detail, following the steps you describe above.

 

Since one of the params required to generate the report is the "EsqString" and this param changes everytime we update the excel report structure.

 

 

 

We would like to know how can we get the most updated EsqString from a specific report in order to use it in our script task?

 

Thanks in Advance.

 

Best Regards,

Pedro Pinheiro

Pedro Pinheiro,

 

Hi,

 

Here is an example of two EsqStrings from two test calls of the GetExportFiltersKey service for the same contact using the same report:

 

EsqString: "{\"rootSchemaName\":\"Contact\",\"operationType\":0,\"includeProcessExecutionData\":true,\"filters\":{\"items\":{\"a3cef0ef-1871-4dfe-ac72-f6f322b1be57\":{\"filterType\":1,\"comparisonType\":3,\"isEnabled\":true,\"trimDateTimeParameterToDate\":false,\"leftExpression\":{\"expressionType\":0,\"columnPath\":\"Id\"},\"rightExpression\":{\"expressionType\":2,\"parameter\":{\"dataValueType\":1,\"value\":\"c4ed336c-3e9b-40fe-8b82-5632476472b4\"}}}},\"logicalOperation\":0,\"isEnabled\":true,\"filterType\":6},\"columns\":{\"items\":{\"Full name\":{\"caption\":\"Full name\",\"orderDirection\":0,\"orderPosition\":-1,\"isVisible\":true,\"expression\":{\"expressionType\":0,\"columnPath\":\"Name\"}},\"Age\":{\"caption\":\"Age\",\"orderDirection\":0,\"orderPosition\":-1,\"isVisible\":true,\"expression\":{\"expressionType\":0,\"columnPath\":\"Age\"}},\"Email\":{\"caption\":\"Email\",\"orderDirection\":0,\"orderPosition\":-1,\"isVisible\":true,\"expression\":{\"expressionType\":0,\"columnPath\":\"Email\"}}}},\"isDistinct\":false,\"rowCount\":-1,\"rowsOffset\":-1,\"isPageable\":false,\"allColumns\":false,\"useLocalization\":true,\"useRecordDeactivation\":false,\"serverESQCacheParameters\":{\"cacheLevel\":0,\"cacheGroup\":\"\",\"cacheItemName\":\"\"},\"queryOptimize\":false,\"useMetrics\":false,\"adminUnitRoleSources\":0,\"querySource\":0,\"ignoreDisplayValues\":false,\"isHierarchical\":false}"

 

 

EsqString: "{\"rootSchemaName\":\"Contact\",\"operationType\":0,\"includeProcessExecutionData\":true,\"filters\":{\"items\":{\"aed2f24c-bb67-4a1d-9504-33e9bb3010e5\":{\"filterType\":1,\"comparisonType\":3,\"isEnabled\":true,\"trimDateTimeParameterToDate\":false,\"leftExpression\":{\"expressionType\":0,\"columnPath\":\"Id\"},\"rightExpression\":{\"expressionType\":2,\"parameter\":{\"dataValueType\":1,\"value\":\"c4ed336c-3e9b-40fe-8b82-5632476472b4\"}}}},\"logicalOperation\":0,\"isEnabled\":true,\"filterType\":6},\"columns\":{\"items\":{\"Full name\":{\"caption\":\"Full name\",\"orderDirection\":0,\"orderPosition\":-1,\"isVisible\":true,\"expression\":{\"expressionType\":0,\"columnPath\":\"Name\"}},\"Age\":{\"caption\":\"Age\",\"orderDirection\":0,\"orderPosition\":-1,\"isVisible\":true,\"expression\":{\"expressionType\":0,\"columnPath\":\"Age\"}},\"Email\":{\"caption\":\"Email\",\"orderDirection\":0,\"orderPosition\":-1,\"isVisible\":true,\"expression\":{\"expressionType\":0,\"columnPath\":\"Email\"}}}},\"isDistinct\":false,\"rowCount\":-1,\"rowsOffset\":-1,\"isPageable\":false,\"allColumns\":false,\"useLocalization\":true,\"useRecordDeactivation\":false,\"serverESQCacheParameters\":{\"cacheLevel\":0,\"cacheGroup\":\"\",\"cacheItemName\":\"\"},\"queryOptimize\":false,\"useMetrics\":false,\"adminUnitRoleSources\":0,\"querySource\":0,\"ignoreDisplayValues\":false,\"isHierarchical\":false}"

 

The only thing that is modified here is an Id of the "items" parameter in the "filters" part. I guess that you can generate a random GUID here using Guid.NewGuid(). Other key parameters here are:

 

1) \"rootSchemaName\":\"Contact\" - report on which section record should be generated

2) "value\":\"c4ed336c-3e9b-40fe-8b82-5632476472b4\" - Id of the record itself

3) \"columns\" - list of columns of the report, can remain static for each report, but should be updated in case the columns set in the report setup is modified.

 

 

Please test the following approach of adding the random GUID to the filter items and let us know in case you face some issues with it.

 

Best regards,

Oscar

Hi Oscar Dylan,

 

Thank you for the response.

 

Our problem is related with the \"columns\" list.

 

The Script Task receive the reportId from the process parameter. This parameter is changed depending on which report we want to store in the attachments.

 

The main goal is to update the \"columns\" list based on the reportId received, because each report has its own structure. Finaly, we generate and store the correct report.

 

This whole process cannot have user interaction, we need to find a way to get the columns list from a specific report inside the process.

 

If you have any questions feel free to ask.

 

Thanks in Advance.

 

Best Regards,

Pedro Pinheiro

 

Pedro Pinheiro,

 

Hi,

 

Then you need to check the IntExcelreportMixin. The columns list and the EsqString is formed inside getIntExcelReport function that receives esq as an argument:

			var requestData = {
				EsqString: esq.serialize(),
				ReportId: reportId,
				RecordCollection: recordCollection
			};

and esq itself is formed in two methods: addCustomProfileColumns and prepareProfileColumns:

prepareProfileColumns: function(profileSettings) {
			var profileColumns = [];
			var profile = profileSettings && profileSettings.DataGrid;
			if (!profile) {
				return profileColumns;
			}
			var gridsColumnsConfig = profile.isTiled ? profile.tiledConfig : profile.listedConfig;
			if (gridsColumnsConfig) {
				var columnsConfig = this.Ext.decode(gridsColumnsConfig);
				this.Terrasoft.each(columnsConfig.items, function(item) {
					profileColumns.push({
						aggregationType: item.aggregationType,
						caption: item.caption,
						dataValueType: item.dataValueType,
						path: item.path || item.bindTo,
						subFilters: this.Terrasoft.deserialize(item.serializedFilter),
						type: item.type || this.Terrasoft.GridCellType.TEXT
					});
				}, this);
			}
			return profileColumns;
		},
		addCustomProfileColumns: function(esq, profile) {
			var allColumns = Boolean(profile && profile.DataGrid && profile.DataGrid.allColumns);
			esq.allColumns = allColumns;
			if (allColumns) {
				return;
			}
			var profileColumns = this.prepareProfileColumns(profile);
			this.Terrasoft.each(profileColumns, function(column) {
				var columnName = column.caption;
				if (!esq.columns.contains(columnName)) {
					if (column.aggregationType) {
						this.addProfileAggregationColumn(esq, column, columnName);
					} else {
						esq.addColumn(column.path, columnName);
					}
					var newColumn = esq.columns.get(columnName);
					newColumn.caption = column.caption;
				}
			}, this);
		},

And once esq is formed and serialized it becomes a correct Esq.String that we need:

So you need to copy the logic of the mixin using C#.

 

Best regards,

Oscar

Oscar Dylan,

 

I'm trying to implement the logic of the mixin on my script task as you said. But I'm having trouble understanding the profile argument. Can you please explain me how do I get/generate the profile data that is being used by addCustomProfileColumns method as argument  on my script task?

 

Thanks in Advance.

 

Best Regards,

Pedro Pinheiro

Oscar Dylan,

 

I think I found the solution to my problem. The object IntExcelReport contains a specific column that has the ESQ String as you can see in the image bellow.

 

 

I've check the values and it matches the query inside the requestData. Now I can get this value with a simple db query and use it to generate my ExcelReport.

 

 

Best Regards,

Pedro Pinheiro

Did anyone actually manage to get this to work?

 

Thanks,

Show all comments
Import
large data
excel
7.12_()
sales_enterprise

Hi all,

I'm starting a contract project helping to convert an automated workflow-based system to BPM Online. Our Database is fully 3rd normal form with over 60 tables. In the grand scheme of things, it's a pretty small database, however for import into BPM Online, it seems to be pushing the limits when it comes to importing data.

BPM Online will be substantially customized with forms and workflow. 

At this point, I'm struggling with two different issues:

1. I've been told that Excel spreadsheets are the only way to import legacy data, and each spreadsheet can only be a maximum of 10 MB. Some of our tables have almost a million rows each and will be 20+ spreadsheets each. That means we'll have more than a hundred separate import runs.

2. A test loading one spreadsheet of one of our tables with 60 columns took an hour. It appears that we're looking at over 100 hours runtime, just to load our data.

This seems burdensome for import into an enterprise class appplication like BPM Online. Is there another approach?

BTW, I'm not sure which product and version we'll be on. I marked Enterprise.

Thanks in advance to all,

Bill

Like 1

Like

1 comments

Dear Bill,

You can create a webservice which will transfer data from your system to BPM'online. It will still impact performance of your system but it will be more flexible for your business task. I have picked a couple of articles from our academy that should help you to implement this functionality:

https://academy.bpmonline.com/documents/technic-sdk/7-13/integration-bp…

https://academy.bpmonline.com/documents/technic-sdk/7-12/web-services-c…

https://academy.bpmonline.com/documents/technic-sdk/7-13/odata

https://academy.bpmonline.com/documents/technic-bpms/7-13/studying-web-…

You may also refer to sub articles in the "See also" section below the main article.



Best regards,

Angela

Show all comments