Null Values not displaying in Form

parkerr79991488

21-09-2018

I'm using a form to display the output document we send to customers. Some of the products have serial numbers and some do not have serial numbers, so when we enter the line items on a form, perhaps 10 items, only 5 of them will have serial numbers. When this displays on the form, it bumps all 5 serial numbers to display in rows 1-5 of the table, even though they might be for line item 1,3,4,6 and 10. Below is the XML schema for the serial number field, as I'm hoping there is something simple that I am forgetting.

<field minH="4.282mm" name="colSerialNumber_4WBK44MW54WDAT7CJDFSCMSH0_35495" w="24.594mm">

                        <ui>

                           <textEdit multiLine="1">

                              <border presence="hidden"/>

                              <margin/>

                           </textEdit>

                        </ui>

                        <font size="9pt" typeface="Arial"/>

                        <margin bottomInset="1mm" leftInset="1mm" rightInset="1mm" topInset="1mm"/>

                        <border>

                           <edge thickness="0.18mm">

                              <color value="91,91,91"/>

                           </edge>

                           <corner thickness="0.18mm">

                              <color value="91,91,91"/>

                           </corner>

                        </border>

                        <bind match="dataRef" ref="$.ServiceOrder.Item[*].SerialNumber_4WBK44MW54WDAT7CJDFSCMSH0"/>

                        <assist>

                           <speak disable="1"/>

                        </assist>

                        <validate nullTest="error"/>

                     </field>

Any help would be appreciated.

Accepted Solutions (0)

Answers (3)

Answers (3)

_Bruce_Robertson

MVP

21-09-2018

Hi,

You should bind the repeating element in your form (probably the Row object if a table) to the repeating element in the XML, so $.ServiceOrder.Item[*] then the field above should have a relative binding to Item, so just $.SerialNumber_4WBK44MW54WDAT7CJDFSCMSH0.  That way the columns will stay in sync.

Regards

Bruce

_Bruce_Robertson

MVP

11-02-2019

Hi,

Make sure you have the object in the form bound to the repeating item in the XML.  So the binding expression should end with a "[*]".  It sounds like the column fields have a binding expression which includes the "[*]".

Looks like the forum mucked up you XML, maybe a screen shot and maybe one of the form structure as well.

Regards

Bruce

kellyp4063807

06-02-2019

I sort of have the same problem.   I have a table which lists out a row for each product (fertilizer).   Each different fertilizer has different values for the nutrient columns such as Nitrogen, Phosphate, Potassium.

The XML file sends these values over, however if a product doesn't have any of a particular nutrient in it, such as Nitrogen, it leaves the field blank.   If the next row in the table does have a value for that field, it's sliding it up into the wrong row.

I believe the problem I am having is that the XML file does not carry over the field at all if it's a null value.

the below is a cut out of my XML and as you can see it's got a value for Sulfur and a value for Nitrogen...but nothing comes across for the Phosphate and Potassium.

="http://sap.com/xi/AP/CustomerExtension/BYD/A2OJ5">26.0</n2:Sulfur_DIR636RZVZN74USPXJKNLHNQS>

      <n2:Nitrogen1_DIR636RZVZN74USPXJKNLHNQS xmlns:n2="http://sap.com/xi/AP/CustomerExtension/BYD/A2OJ5">12.0</n2:Nitrogen1_DIR636RZVZN74USPXJKNLHNQS>