• RestService with multiple values view (ExtLib v08)

    By Roman Galiullin 7 years ago

    Ext lib - 9.0.1.v08_00_20170223-0757

    One page, without parameters, same database. First column sorted and multiple values separate entries(FirstName:LastName:Position:(Position + " " + LastName) -> exmple values: Roman:Galiullin:Developer:Developer Galiullin). Why service return 7 entries, but dataTable - 1(correct)? On other keys REST return 3, 4, 7 etc. entries, but must return only 1

    <font color="#333333"><xe:restService id="restService1" pathInfo="people" preventDojoStore="true"></font>
    <font color="#333333">        <xe:this.service></font>
    <font color="#333333">            <xe:viewJsonService databaseName="DATABASE NAME" viewName="people"</font>
                    contentType="application/json" var="entry" keys="galiul" systemColumns="2">
    <font color="#333333">            </xe:viewJsonService></font>
    <font color="#333333">        </xe:this.service></font>
    <font color="#333333">    </xe:restService></font>
    
    <font color="#333333">    <xp:dataTable id="dataTable1" rows="30"></font>
    <font color="#333333">        <xp:this.value><![CDATA[#{javascript:var db = session.getDatabase(CURRENTSERVER, DATABASE);</font>
    var nView = db.getView('people');
    return nView.getAllEntriesByKey('galiul', false);
    <font color="#333333">}]]></xp:this.value></font>
    <font color="#333333">        <xp:column id="column1">1</xp:column></font>
    <font color="#333333">    </xp:dataTable></font>
    

    And where i can download source code for new ext lib?

    • By Roman Galiullin 7 years ago
      <xe:restService id="restService1" pathInfo="people" preventDojoStore="true">
              <xe:this.service>
                  <xe:viewJsonService databaseName="DATABASE NAME" viewName="people"
                      contentType="application/json" var="entry" keys="galiul" systemColumns="2">
                  </xe:viewJsonService>
              </xe:this.service>
          </xe:restService>
      
          <xp:dataTable id="dataTable1" rows="30">
              <xp:this.value><![CDATA[#{javascript:var db = session.getDatabase(CURRENTSERVER, DATABASE);
      var nView = db.getView('people');
      return nView.getAllEntriesByKey('galiul', false);
      }]]></xp:this.value>
              <xp:column id="column1">1</xp:column>
          </xp:dataTable>
      
    • By Dave Delay 7 years ago

      9.0.1.v08_00_20170223-0757 is the version number for plugins originating from the 9.0.1 FP8 installer. As far as I know, we have not posted source code for that release. However, I would venture to say there haven't been many changes since 901v00_17.20160428-0214.

      With regard to the actual problem you are reporting, are you saying this is a regression in 9.0.1 FP8? Have you tried the same thing in a previous version?

      • By Roman Galiullin 7 years ago

        Thanks for the answer!
        The problem occurred after the upgrade to FP8.
        Before upgrade was version 16 and everything worked fine.

        For example. REST returns

        [
          {
              "@entryid":"2038-XXX",
              "@unid":"XXX",
              "person":"R. Galiullin",
              "position":"Lotus Notes Developer"
          },
          {
              "@entryid":"2604-XXX",
              "@unid":"XXX",
              "person":"R. Galiullin",
              "position":"Lotus Notes Developer"
          },
          {
              "@entryid":"3418-XXX",
              "@unid":"XXX",
              "person":"R. Galiullin",
              "position":"Lotus Notes Developer"
          },
          {
              "@entryid":"3923-XXX",
              "@unid":"XXX",
              "person":"R. Galiullin",
              "position":"Lotus Notes Developer"
          },
          {
              "@entryid":"5246-XXX",
              "@unid":"XXX",
              "person":"R. Galiullin",
              "position":"Lotus Notes Developer"
          },
          {
              "@entryid":"6414-XXX",
              "@unid":"XXX",
              "person":"R. Galiullin",
              "position":"Lotus Notes Developer"
          },
          {
              "@entryid":"6562-XXX",
              "@unid":"XXX",
              "person":"R. Galiullin",
              "position":"Lotus Notes Developer"
          }
        ]

        In lotus agent debugger entry with position 2038 returns correct - entry.ColumnValues[0] = [“galiullin roman”]

        Entry with position 2604 return incorect - entry.ColumnValues[0] = [“hrXXXX”]
        Entry with position 3418 return incorect - entry.ColumnValues[0] = [“lotus notes developer galiullin roman”]

        etc..

      • By Roman Galiullin 7 years ago

        After updating another server - a bug appeared and on it

        • By Dave Delay 7 years ago

          Roman,

          I sent an email about this to an IBM colleague. He is the expert in this area but he is on vacation this week. Hopefully, he will reply here when he gets back.

          Meanwhile, this appears to be a defect in FP8 itself. That is a supported product, so you could raise the issue through IBM support.

          Thanks.

          • By Roman Galiullin 7 years ago

            Hi

            Any news? In the debugger, the class changed from SearchKeyNavigator to SearchKeyNavigatorNavigator. Also, the source code v17 is very different from the way the debugger goes. The problem has already surfaced several times ..

            Thank you

          • By Roman Galiullin 7 years ago

            If column is separate entries and document split to multiple entries, then rest with “keys” return multiple entries