Skip to main content
10-Marble
July 5, 2023
Solved

CWC(3.1.1) Spreadsheet to Json File and then as Query in MSSQL

  • July 5, 2023
  • 2 replies
  • 1504 views

While filling up the Spreadsheet(Equipment) there are no columns for the Equipmenttypeuid and when I am trying to run that query without that column , error is coming that Equipmenttypeuid cant be null.
Can someone help me regarding populating the Data in DB.

For the PTC Guide reference --> https://support.ptc.com/help/thingworx_applications_setup/r1.0/en/#page/applications_setup/Common_Config_Process_JSON_File.html#
image.pngspreadsheet.png

 

 

 

Best answer by RG_10417299

I have done a TYPO Error.

Now it's resolved. 

Thanks a lot !!

2 replies

24-Ruby III
July 6, 2023

As an option: try setting the condition in the spreadsheet - "IF (NULL, "Unknown", G3)".

mstarnaud
16-Pearl
July 26, 2023

Hi RG

 

Sorry I haven't seen this until now. Is this still an issue?

 

There are a lot of tabs in Excel (like Equipments) that have columns based on a parent tab (Equipment Types). Normally the child tab (Equipments) will try to force you to write names contained in the parent tab. There's a reason for that : it's required that Equipments have a valid parent Type. If the Type with that name doesn't exist by the time you reach the Equipment tab, the import will fail. Inside the procedure (in SQL), it will automatically try to get the EquipmentTypeUid based on the EquipmentTypeName you wrote, this is why there's no EquipmentTypeUid column in the file.

 

So now the question is : why is it failing to find the parent Type? My main suspect would be if one of the EquipmentTypeNames doesn't match exactly with its corresponding parent. My other suspect would be to check that all your corresponding Types have the Selected flag and are included in the resulting import text.

 

You could share the Excel file and/or the resulting text file here so I could look at it. If some of your equipment types come from previous imports, you can check them with this query in SQL : 

 

SELECT name FROM equipmenttype

 

 

If there really is a strange bug with some equipment, you could always use the UI to create it in the Configuration -> Equipment screen. But I have never seen an issue that would force us to do this, normally there should be an easy fix with the import.

RG_1041729910-MarbleAuthorAnswer
10-Marble
August 2, 2023

I have done a TYPO Error.

Now it's resolved. 

Thanks a lot !!