Using the custompropertyID to show custom property in a custom table
john_allen289
Member Posts: 41 PRO
Can someone show me the correct syntax to use the customPropertyID with PropertyType.CUSTOM?
I just can't get it to work for some reason (mostly because I have almost no idea what I'm doing with FS!), but trying hard to learn.....
var custom1 = getProperty(context, { "entity" : part, "propertyType" : PropertyType.CUSTOM, "custompropertyID" : 5f15b2e90eb1e3150e07046f } );
I just can't get it to work for some reason (mostly because I have almost no idea what I'm doing with FS!), but trying hard to learn.....
var custom1 = getProperty(context, { "entity" : part, "propertyType" : PropertyType.CUSTOM, "custompropertyID" : 5f15b2e90eb1e3150e07046f } );
Tagged:
0
Best Answers
-
The ID is a text string so put it in quotes.Senior Director, Technical Services, EMEA0
-
It looks like one issue you may have been having is that you've misspelled customPropertyId. Keys are string arguments, so enclosing them in quotation marks is fine (unless you want to use a variable defined elsewhere as a key). Thus, your line of code should actually look something like the following:
var custom1 = getProperty(context, { "entity" : part, "propertyType" : PropertyType.CUSTOM, "customPropertyId" : "5f15b2e90eb1e3150e07046f" });Software Developer at Epic Systems
FRC Design Mentor - Team 1306 BadgerBots0
Answers
-
The ID is a text string so put it in quotes.Senior Director, Technical Services, EMEA0
-
Thanks Neil for the punchy response, seem so simple and I had tried that, but was getting a missing SEMI error, looks like I had also mistakenly put the phrase customPropertyID in quotes which wasn't helping, seems be working now! Thanks.

0 -
It looks like one issue you may have been having is that you've misspelled customPropertyId. Keys are string arguments, so enclosing them in quotation marks is fine (unless you want to use a variable defined elsewhere as a key). Thus, your line of code should actually look something like the following:
var custom1 = getProperty(context, { "entity" : part, "propertyType" : PropertyType.CUSTOM, "customPropertyId" : "5f15b2e90eb1e3150e07046f" });Software Developer at Epic Systems
FRC Design Mentor - Team 1306 BadgerBots0 -
Ah, I see, typo and quote marks on both the Key and the string is fine. This is my first conscious use of Keys so thanks for that. Face palm on the typo’s, I know many will roll their eye at this...But I know I will learn faster if I air my failings on here. Thanks for the help Alex.
0


