8 Replies Latest reply on Apr 7, 2017 2:15 AM by anna RSS
    pgupta-2 Apprentice

    Smart Property Widget

    I am trying to use smart property widget for displaying a fields which are dynamic. The display is coming inconsistent when GridMetaData JSON is fed through a service.

    Wondering if anyone has used this widget from market place.

    thanks,

    Preeti

      • Re: Smart Property Widget
        liliu Creator

        Hi Preeti,

        Please tell us what's the Extension name that you download from the MarketPlace?

         

        Lily

          • Re: Smart Property Widget
            pgupta-2 Apprentice

            Hi Lily,

            It is Smart Grid Property Widget from Thingworx lab.

            thanks.

              • Re: Smart Property Widget
                polinao Collaborator

                Could you please provide steps to reproduce, along with the expected result vs actual result? We will submit a jira if a defect is confirmed or if an improvement is making sense.

                • Re: Smart Property Widget
                  liliu Creator

                  Hi Preeti,

                   

                  Hope you had a nice weekend. Would you mind to share the service that you are using to return GridMetaData JSON string. As Polina asked, also provide us the detial reproduce steps.

                   

                  Lily

                    • Re: Smart Property Widget
                      pgupta-2 Apprentice

                      Sorry about the late reply.

                      The GridMetaData service JSON is fed through a service. I am reading an infotable and based on the fields (which varies) the JSON output example is shown below... I want fields to get into two different groups. ( Required, Non Required)

                      result

                      {"SpecialInstructions":{"name":"Special Instructions","group":"Non-Required","baseType":"STRING"},"FloatVar":{"name":"FloatVar","group":"Required","baseType":"NUMBER"},"Justification":{"name":"Justification","group":"Non-Required","baseType":"STRING"},"WTPartCreated":{"name":"WTPart Created","group":"Required","baseType":"STRING"},"ReadOnlyVar":{"name":"ReadOnlyVar","group":"Non-Required","type":"label","baseType":"STRING"}}

                       

                       

                       

                      There is no "Other" group defined in the service. But for some reason it completely bypass the JSON supplied through the service and shows the group Other which I think it is defaulting in the widget itself. The result is not consistent.

                      Though the widget UI looks good. But in my use case I can not use it as the display is not working consistently.

                      I do not know if I have to open a tech support call. Let me know.

                       

                       

                      thanks,

                      Preeti

                        • Re: Smart Property Widget
                          liliu Creator

                          Hi Preeti,

                           

                          I just reproduced your issue when using a service to return the GridMetadata.

                          Somethings it looks like the first picture, but occasionally it shows me the second picture.

                          We will open a Jira ticket to R&D and ask for further help.

                          I checked the owner of this extension, it's from ThingWorx Lab, which is currently not supported by ThingWorx, I am afread that R&D may not response to this.

                           

                          I also tested it by add your code in the Smart Grid Property widget  directly instead of using a service, it works fine. I suggest you to use this way first. And if there is any good news from R&D, I will let you know.

                           

                          BR,

                          Lily

                            • Re: Smart Property Widget
                              pgupta-2 Apprentice

                              Yes. It is very inconsistent. Looks like the DOM in Thingworx is varying with every refresh.

                              I also tried with static JSON for GridMetaData and it worked. However JSON is dynamic for my use case so I could not use smart property widget.

                              For now what I did is to use two Dynamic Property widget where I am dynamically populating fields based on the grouping. I do not like this way. Since the UI does not look good.

                              If you find a fix for this that would be great. I probably have to look into how to modify this Smart Grid for my use case.

                               

                              thanks for looking into this. I appreciate it.

                               

                              Preeti