question

levi avatar image
levi asked

DisplayProperties bug with capitalization of properties.

I have a DisplayProperty using the following object: public class CardDataDisplayProperties { public string modifiedFromCardId = "-1"; public string modifiedFromKeyword = "-1"; }

When I do a simple query, such as DisplayProperties\modifiedFromCardId eq '0' (and the UGC item exists), I get no hits. The variable names in the DisplayProperty settings are lower-cased.

But, when I re-assign the variables as upper-case, e.g.:

 public class CardDataDisplayProperties
         {
             public string ModifiedFromCardId = "-1";
             public string ModifiedFromKeyword = "-1";
         }

And use the upper-case version of the filter: DisplayProperties\ModifiedFromCardId eq '0' I now get the hit.

In-Game Economy
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Neils Shi avatar image
Neils Shi answered

I did some testing, but I couldn't reproduce your scenario. First, I set the lower-cased variable names “modifiedFromCardId”in the DisplayProperty mapping settings : 6220-test3.png

And I have an item which has lower-cased DisplayProperty like this : 6231-4.png

Then I can use API SearchItems with “Filter": "DisplayProperties/modifiedFromCardId eq '-1'” to search for item with no problem. Then if I call API SearchItems with “Filter": "DisplayProperties/ModifiedFromCardId eq '-1'”, at this time, even though I used the upper-cased "ModifiedFromCardId" in the Filter, I was also able to search for the item which has lower-cased DisplayProperty : {"modifiedFromCardId": "-1"} successfully. Please note that you must make sure that the Display property mapping keys are match with the item’s display property keys, and the Filter in API SearchItems is not case sensitive.


test3.png (18.7 KiB)
4.png (3.4 KiB)
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.