How to Delete a DataShape Filed Through Service in ThingWorx?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
How to Delete a DataShape Filed Through Service in ThingWorx?
嘿,
我想通过服务删除DataShape字段。我找到了使用Json和mathod创建DataShape来创建字段的代码片段。但是我找不到片段来删除服务中的DataShape字段。
请告诉我。
Solved! Go to Solution.
- Labels:
-
Best Practices
-
Design
-
Solution Central
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
You can delete a DataShape Field using RemoveFieldDefinition.
You can follow below steps to delete DataShape field through service:
1. Create a Thing
2. Add a service
3. Provide the name.
4. Click on Other entities and search for the datashape where you want to delete the field definition.
5. Click on the service and use RemoveFieldDefinition and execute.
eg: DataShapes["testDatashape"].RemoveFieldDefinition({
name: "empName" /* STRING */
});
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
You can delete a DataShape Field using RemoveFieldDefinition.
You can follow below steps to delete DataShape field through service:
1. Create a Thing
2. Add a service
3. Provide the name.
4. Click on Other entities and search for the datashape where you want to delete the field definition.
5. Click on the service and use RemoveFieldDefinition and execute.
eg: DataShapes["testDatashape"].RemoveFieldDefinition({
name: "empName" /* STRING */
});
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I test the snippets. It's helpful. Thanks a lot.
![](/skins/images/695EE5AD3E567050FEDD72575855ED93/ptc_skin/images/icon_anonymous_message.png)