cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X

creating datashape and its fields in runtime

achitters
9-Granite

creating datashape and its fields in runtime

hi

how to create the datashape and its fields by giving the fields and its basetype in runtime based upon the data from csv file.

thanks

3 REPLIES 3
supandey
19-Tanzanite
(To:achitters)

Hi @achitters have you already seen the CreateDataShape service available in the Resource EntityService, you'll have to map the column headers from csv to the fields that can be passed to the fields in this CreateDataShape()

 

05-04-2018 10-16-03.jpg

the datashape is already created in runtime  and unable to set the primary key and basetype of the field in runtime.

supandey
19-Tanzanite
(To:achitters)

I believe that should be doable with the UpdateFieldDefinition() , eg.

 

 DataShapes["DemoDS"].UpdateFieldDefinition({
	name: "Field1" /* STRING */,
	description: undefined /* STRING */,
	type: INTEGER/* BASETYPENAME */,
	ordinal: undefined /* INTEGER */,
	primaryKey: true/* BOOLEAN */,
	dataShape: undefined /* DATASHAPENAME */
});
Announcements


Top Tags