Visual Builder

Get Involved. Join the Conversation.

Topic

    John Wilson Cusi
    List View on VBCS Version: 19.3.1.4Answered
    Topic posted November 12, 2019 by John Wilson CusiBronze Medal: 1,250+ Points, last edited November 12, 2019 
    36 Views, 11 Comments
    Title:
    List View on VBCS Version: 19.3.1.4
    Summary:
    Is there a defect on List View on VBCS Version: 19.3.1.4
    Content:

    What has been change from the List View component from VBCS version 19.1.3 and version 19.3.1.4?

    I am displaying the attached json response (the service info part only) to a List View. It works on the older version however no data is being displayed in the new version.

    The REST web service was tested successfully on both versions and are returning values. There is also no difference on how I implemented it on each versions. I retested even in Table View but the new version is not displaying any data, works well in the old.

    Help!

    note: json response data are all tests and are not live/real data

    Version:
    VBCS 19.3.1.4
    Document:
    Document:
    SDP.jpg (36KB)
    Video:

    Best Comment

    John Ceccarelli

    Hmmm, no way I can see that this would have worked in the previous version. The DataProvider here returns not an array of objects but a single object. It should be listed as a GET and not a GET MANY type of endpoint when you create it. 

    Is there a REST API that allows you to fetch just the array, something like GET /basrURL/account360ViewInfo/servicePointInfo that would return just an array of items then you could register that as a service and use that. Otherwise do the following:

    1. Create a type from endpoint based on account360ViewInfo
    2. Create another type which is an object that matches the content of a single servicePointInfo - call it servicePointInfo
    3. Create a page variable called account360 of type account360ViewInfo
    4. Create a page variable called servicePointInfoADP of type ADP and set its Item Type to servicePointInfo. You have to specify an ID Attribute which should be an integer but you'll have to put servicePointNumber there because there is no unique ID field. that could be a problem later depending on what you want to do with this table.
    5. Create an action chain that on vb-enter class your rest endpoint, then maps it to the account360 page variable. Then assign $chain.results.callRestEndpoint1.body.account360ViewInfo.servicePointInfoList.servicePointInfo to your servicePointInfoADP.data of your ADP.
    6. Drop a table on your page, don't use the Add Data quickstart. Instead in the Data tab just select servicePointInfoADP in the Data field and use the PI to select the columns.

     

    Comment

     

    • John Ceccarelli

      can you post the SDP JSON and the HTML of the listview?

    • John Ceccarelli

      from both would be great if you still have the old one somewhere. but new version is fine. 

      • John Wilson Cusi

        updated the post and included the new version's List View html & SDP. I will get the one from the older version

        • John Wilson Cusi

          It's almost the same for the old version, but I updated attachments on the post anyways.

          It's really weird. I am checking both and everything seems to be identical.

    • Shay Shmeltzer

      Looks to me like your table is not pointing to the right level of hierarchy in your SDP.

      Your SDP seems to have the array inside two level of objects - and your HTML seems to expect it at the top level.

      I'm not sure how this worked in the old version though.

       

      • John Wilson Cusi

        Hi Shay,

        I'm somehow still new with VBCS, can I ask you what are my alternatives to make List View work in VBCS with the current json response? I only know to connect List View to a REST endpoint/SDP, I do not know how to insert processing of data in between of the REST response and the List View. If I could somehow isolate the array inside first and then bind the isolated data to List View.

        • John Ceccarelli

          Hmmm, no way I can see that this would have worked in the previous version. The DataProvider here returns not an array of objects but a single object. It should be listed as a GET and not a GET MANY type of endpoint when you create it. 

          Is there a REST API that allows you to fetch just the array, something like GET /basrURL/account360ViewInfo/servicePointInfo that would return just an array of items then you could register that as a service and use that. Otherwise do the following:

          1. Create a type from endpoint based on account360ViewInfo
          2. Create another type which is an object that matches the content of a single servicePointInfo - call it servicePointInfo
          3. Create a page variable called account360 of type account360ViewInfo
          4. Create a page variable called servicePointInfoADP of type ADP and set its Item Type to servicePointInfo. You have to specify an ID Attribute which should be an integer but you'll have to put servicePointNumber there because there is no unique ID field. that could be a problem later depending on what you want to do with this table.
          5. Create an action chain that on vb-enter class your rest endpoint, then maps it to the account360 page variable. Then assign $chain.results.callRestEndpoint1.body.account360ViewInfo.servicePointInfoList.servicePointInfo to your servicePointInfoADP.data of your ADP.
          6. Drop a table on your page, don't use the Add Data quickstart. Instead in the Data tab just select servicePointInfoADP in the Data field and use the PI to select the columns.

           

    • John Ceccarelli