Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    #31
    Hi Isomorphic,

    thanks, that is then option 2, "don't use fallback for data fields in columnRemap, use fallback (based on a combination of title, name and uploadFieldName) for others", I believe.
    It should be no problem for me to fill columnRemap after initial load with self-references or null for the remaining columns. I'll let you know how this works after tomorrow's build arrives.

    Thank you & Best regards
    Blama

    Comment


      #32
      Regarding filling columnRemap with null for remaining columns. Please keep in mind that columnRemap map holds field aliases as keys and real field names as values. Using null as KEY in this scenario is technically possible, but would work only for single field, cause you can't have 2 key-value pairs with the same key (null) in a map. So, we advice you to use self-references or some kind of dummy values as KEYS in columnRemap for remaining columns.

      Comment


        #33
        Hi Isomorphic,

        using v11.1p_2017-11-16 and adding this code after the columnRemap-filling, the testcase is working as expected:
        Code:
                    DataSource importDataSource = DataSourceManager.get(importDS);
                    for (DSField dsf : importDataSource.getFields()) {
                        if (!columnRemap.containsValue(dsf.getName()))
                            columnRemap.put(dsf.getName(), dsf.getName());
                    }
                    DataSourceManager.free(importDataSource);
        This will disable any title-to-target-field-guessing, because now all fields are in column-remap, correct?
        So even if I had additional data in my dataset not matching any column-name, but a title, this would be discarded?

        I'll retry with my application soon, but think it will work there as well. Did you also port this fix to 5.1p?

        Thank you & Best regards
        Blama

        Comment


          #34
          Hi Isomorphic,

          using v10.1p_2017-11-17 and the code addition from #33, it seems that this is also working in my application in test.
          I'll let you know again once I deployed the change.

          Thank you & Best regards
          Blama

          Comment


            #35
            Sorry for the late answer. Your code snippet would work fine, as it will prevent any accidental matches in field titles. And yes, this is ported to 5.1 as well.

            Comment


              #36
              Hi Isomorphic,

              thanks, it's working for me, also in my deployed application. Now the switch to 6.1p will happen any day...

              Thank you & Best regards
              Blama

              Comment

              Working...
              X