• If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Announcement

Collapse
No announcement yet.

Form Widgets Losing Original Order

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Form Widgets Losing Original Order

    Hello CNX,

    I have discovered that when I create a form widget in Valence, and the form widget has too many fields, then the order of the fields from top to bottom will change each time I save the widget (from the widget editor in Nitro App Builder).

    I have noticed that the nature of this bug (particularly the point where the order stops staying consistent between saves) is dependent on a variety of factors, such as ...
    • If I have defined a number of columns for the form widget, instead of just using the default, which is 1 column (verified)
    • If I have placed any of the form fields into their own "groups" (verified)
    • How many fields are in each group (verified)
    • Maybe even the size of the fields (not verified, but I have seen evidence of this)

    Because of all of these factors, this bug may be hard to narrow down, so I wanted to provide you with a simple example, so that narrowing down the source of the problem is easier for your team.


    Here is my example:


    Start by creating a data source.
    Select from the SysIBM.SysDummy1 table.
    Start making up fields, and all of them with the same exact hardcoded value of 1 (numeric)
    Name the first field "field001", the second field "field002", and so on.


    Here is an example that you can copy-and-paste:

    SELECT
    1 AS field001,
    1 AS field002,
    1 AS field003,
    1 AS field004,
    1 AS field005,
    1 AS field006,
    1 AS field007,
    1 AS field008,
    1 AS field009,
    1 AS field010,
    1 AS field011,
    1 AS field012,
    1 AS field013,
    1 AS field014,
    1 AS field015,
    1 AS field016,
    1 AS field017,
    1 AS field018,
    1 AS field019,
    1 AS field020,
    1 AS field021,
    1 AS field022,
    1 AS field023,
    1 AS field024,
    1 AS field025,
    1 AS field026,
    1 AS field027,
    1 AS field028,
    1 AS field029,
    1 AS field030,
    1 AS field031,
    1 AS field032,
    1 AS field033,
    1 AS field034,
    1 AS field035,
    1 AS field036,
    1 AS field037,
    1 AS field038,
    1 AS field039,
    1 AS field040,
    1 AS field041,
    1 AS field042,
    1 AS field043,
    1 AS field044,
    1 AS field045,
    1 AS field046,
    1 AS field047,
    1 AS field048,
    1 AS field049,
    1 AS field050,
    1 AS field051,
    1 AS field052,
    1 AS field053,
    1 AS field054,
    1 AS field055,
    1 AS field056,
    1 AS field057,
    1 AS field058,
    1 AS field059,
    1 AS field060,
    1 AS field061,
    1 AS field062,
    1 AS field063,
    1 AS field064,
    1 AS field065,
    1 AS field066,
    1 AS field067,
    1 AS field068,
    1 AS field069,
    1 AS field070,
    1 AS field071,
    1 AS field072,
    1 AS field073,
    1 AS field074,
    1 AS field075,
    1 AS field076,
    1 AS field077,
    1 AS field078,
    1 AS field079,
    1 AS field080,
    1 AS field081,
    1 AS field082,
    1 AS field083,
    1 AS field084,
    1 AS field085,
    1 AS field086,
    1 AS field087,
    1 AS field088,
    1 AS field089,
    1 AS field090,
    1 AS field091,
    1 AS field092,
    1 AS field093,
    1 AS field094,
    1 AS field095,
    1 AS field096,
    1 AS field097,
    1 AS field098,
    1 AS field099
    FROM
    sysibm.sysdummy1
    ?

    Then, make a form widget.
    Select "field001" first, then "field002" second, then "field003" third, and so on, so that the order of the fields matches the number on each field's label.
    That way, the order of the fields is easy to see.
    ?


    If you create a widget like I described above, and the # of fields on that widget is any number between 1 and 99, you can define the order, save the widget, and open up the widget again in Nitro App Builder, and no matter how many times you open the widget back up again, the order that you defined will stay the same. It will always start with field001, then field002, all the way to field099.

    But, if you create that same widget again, with the fields defined and ordered in the exact same way, but this time, you create 100 fields instead of 99, then, if you save the widget and open up the widget again in Nitro App Builder, the order will not match the order that you defined before saving. As a matter of fact, the 100th field will now be placed between field019 and field020. If you save the widget again and open it back up a second time, field099 will now be placed between field019 and field100. And then after that, if you save the widget and open it up a third time, then field098 will now be placed between field019 and field099. Essentially, the field at position 100 at the point of saving will always be placed directly after the field at position 19 when opening back up the application.


    Now, I am never going to create a form with 100 fields, that are all numbers of length 1, in a 100-by1 grid.

    But I most certainly will create a form with various fields of various lengths and arrange them into a number of groups and columns.

    For example, I have recently created an application for my company that contains a form widget much like I described above. The fields within that form widget all have different data types and lengths, and they are currently arranged into 14 groups, with 6 columns per group, and one extra field below the 14 groups, giving me a total of 85 different fields ((6 * 14) + 1). Once I add a 15th group (with 6 columns), the order of the fields starts changing between saves. My users are wanting more than 14 groups, but I am limited to 14 because of this bug.



    In conclusion, it looks like there may be an issue with the underlying data in the widget editor in Nitro App Builder.

    Particularly, there seems to be an issue with whatever logic is responsible for ordering the fields.

    With the simple example used earlier, the logic seems to be failing after creating a form with 100 numbers of length 1.


    Can you look into this?

    Thank you for your time.


    - TonyDB

  • #2
    Thanks for the detailed info...yes, we will look into this.

    Comment


    • #3
      Thank you!

      Comment

      Working...
      X