• 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.

Can't find maximum length value in a form

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

  • Can't find maximum length value in a form

    I need some help. I have a form widget that uses a data source as a dropdown. This field shows an employee's name. We recently changed it because we have 2 employees with the same name. So now it displays the name and employee number. Now I'm suddenly getting a maximum length error on some and I can't find where that is set. This is what it looks like.
    https://screenrec.com/share/iycORejdTB
    Any idea where I can change that maximum value?
    Thank you.

  • #2
    Did you change an existing data source field to combine the 2 values or create a new field for this?

    Comment


    • #3
      Hello Sean. The data source for the Form uses an employee number. Then in the Form widget, the datasource for the dropdown is using the employee name || '-' || employee number. Looks like this.
      SELECT
      eeempn,
      trim(fullname1) || ' - ' || eeempn AS name,
      rrn(DPPEMPMAST) AS rrn1
      FROM
      dppempmast
      .
      It was fullname1 for a long time with no issues.
      fullname1 is a char(43) and eeempn is a dec(5) which is why I'm so confused about where this 30-character limit is coming from.

      Comment


      • #4
        Just curious, if you wrap eeempn in a char() so it doesn't have to implicitly cast its value, does that make a difference?

        So it'd become: trim(fullname1) || ' - ' || char(eeempn) AS name,

        Comment


        • #5
          Unfortunately no. Still getting the error.

          Comment


          • #6
            Did you resave the widget after changing the data source?

            Comment


            • #7
              If that doesn't fix it take note of the data source id and then open table VVDTA300. This holds the max length for each field.

              Comment


              • #8
                the results from that query show the field as VVLEN 5 which makes sense. That's what it is in the datasource for the form.
                that doesn't stop us from putting something bigger in that field as a drop down though.

                Comment


                • #9
                  So just to clarify, have you resaved the form widget?

                  Comment


                  • #10
                    Yes, I did. I now have also tried changing that field to a CAST('' as char(40)) which does show up in the query to vvdta300. vvLEN is 40 now and I'm still getting the error.

                    Comment


                    • #11
                      Can you reach out to support@cnxcorp.com so we can schedule a time to take a closer look at this?

                      Comment


                      • #12
                        Since you modified the underlying data source, I would think you need to remove the transform to a dropdown and recreate it for that form field

                        Comment


                        • #13
                          What we ended up doing is using values from a view that is char(30) instead of the concatenated statement in the data source. No more errors now. I'm getting behind in the project so maybe we can revisit this later.
                          Thanks.

                          Comment

                          Working...
                          X