title: Why the control can not be find by byId?
body: <p>I am trying to get the <code>sap.m.Input</code> control via <code>byId</code> call as following:</p>
  
  <p><a href="https://i.stack.imgur.com/R4JO9.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/R4JO9.png" alt="enter image description here"></a></p>
  
  <p>As you can see above, I am calling: </p>
  
  <pre><code>this.byId("CharInput-001-ZPM_TEST_01-ZPM_TEST_5")
  </code></pre>
  
  <p>with the right <code>id</code> and get <strong>undefined</strong>. What am I doing wrong?    </p>
  
  <p><strong>Hint:</strong> The <code>id</code> was <strong>auto generated</strong> at the runtime, that it means, I click a button and <code>sap.m.Input</code> fields will be auto generated and it places in <strong>SimpleForm</strong> control. </p>
  
  <p><a href="https://i.stack.imgur.com/6nysc.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6nysc.png" alt="enter image description here"></a></p>
  
  <p>Calling <code>SimpleForm</code> with by <strong>id</strong>, the control can be found:</p>
  
  <p><a href="https://i.stack.imgur.com/EL2Ss.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/EL2Ss.png" alt="enter image description here"></a></p>
  
  <p>The fragment:</p>
  
  <pre><code>sap.ui.define([
      "sap/m/Dialog",
      "sap/m/Text",
      "sap/m/Button"
  ], function (Dialog, Text, Button) {
      "use strict";
  
      const fnNumList = () =&gt; {
          return new sap.m.ObjectListItem({
              number: "{ValueHelp&gt;NumValueFrom}",
              numberUnit: "{ValueHelp&gt;UnitOfMeasurement}"
          });
      };
  
      const fnCharList = () =&gt; {
          return new sap.m.StandardListItem({
              description: "{ValueHelp&gt;CharValue}"
          });
      };
  
      const fnCurrList = () =&gt; {
          return new sap.m.ObjectListItem({
              number: "{ValueHelp&gt;CurrValueFrom}",
              numberUnit: "{ValueHelp&gt;CurrCurrencyFrom}"
          });
      };
  
      const fnDateList = () =&gt; {
  
          const oDatePicker = new sap.m.DatePicker({
              dateValue: "{ValueHelp&gt;DateValueFrom}",
              valueFormat: "dd-MM-yyyy",
              displayFormat: "dd-MM-yyyy",
              editable: false
          });
  
          return new sap.m.CustomListItem({
              content: oDatePicker
          });
      };
  
      const fnTimeList = () =&gt; {
          const oTimePicker = new sap.m.TimePicker({
              valueFormat: "HH:mm:ss",
              displayFormat: "HH:mm:ss",
              support2400: true,
              dateValue: "{ValueHelp&gt;TimeValueFrom}",
              editable: false
          });
  
          return new sap.m.CustomListItem({
              content: oTimePicker
          });
      };
  
      const fnDetermineListType = (oValueHelp) =&gt; {
          switch (oValueHelp.DataType) {
          case "NUM":
              return fnNumList();
          case "DATE":
              return fnDateList();
          case "TIME":
              return fnTimeList;
          case "CURR":
              return fnCurrList();
          default:
              return fnCharList();
          }
      };
  
      const fnCreateList = (oValueHelp) =&gt; {
          const oNewList = new sap.m.List({
              includeItemInSelection: true,
              mode: sap.m.ListMode.SingleSelect
          });
  
          oNewList.bindItems({
              path: "ValueHelp&gt;/",
              template: fnDetermineListType(oValueHelp)
          });
  
          return oNewList;
      };
  
      const fnDestroyDialog = (oDialog) =&gt; {
          oDialog.close();
          oDialog.destroy();
      };
  
      return {
  
          showSingle: function (aCharsHelpValues, fnGetSelectedObject, sValueHelpField) {
              const oList = fnCreateList(aCharsHelpValues[0]);
              const oDialog = new Dialog({
                  title: aCharsHelpValues[0].CharValue,
                  content: oList,
                  beginButton: new sap.m.Button({
                      text: "OK",
                      press: function () {
                          fnGetSelectedObject(oList.getSelectedItem().getBindingContext("ValueHelp").getObject(), sValueHelpField);
                          fnDestroyDialog(oDialog);
                      }
                  }),
                  endButton: new sap.m.Button({
                      text: "Close",
                      press: function () {
                          fnDestroyDialog(oDialog);
                      }
                  })
              });
  
              return oDialog;
          }
      };
  
  });
  </code></pre>
  
  <p><strong>Update</strong>
  The input is generated with:</p>
  
  <pre><code>    _buildCharacInputId: function (oData) {
          return "CharInput:" + oData.Classtype + ":" + oData.Classnum + ":" + oData.NameChar;
      },
  
  _determineCtrlForChars: function (oData) {
              const sId = this._buildCharacInputId(oData);
              const self = this;
              switch (oData.DataType) {
              case "CHAR":
                  return new sap.m.Input(sId, {
                      maxLength: oData.NumberDigits,
                      type: sap.m.InputType.Text,
                      showValueHelp: oData.WithValues,
                      valueHelpRequest: self._onCharValueHelp.bind(self)
                  });
              case "CURR":
                  return new sap.m.MaskInput(sId, {
                      mask: oData.Template.replace(/_/g, "9") + (oData.Currency ? " ".concat(oData.Currency) : "")
                  });
              case "DATE":
                  return new sap.m.DatePicker(sId, {
                      valueFormat: "dd-MM-yyyy",
                      displayFormat: "dd-MM-yyyy"
                  });
              case "NUM":
                  return new sap.m.MaskInput(sId, {
                      mask: oData.Template.replace(/_/g, "9") + (oData.UnitTExt ? " ".concat(oData.UnitTExt) : "")
                  });
              case "TIME":
                  return new sap.m.TimePicker(sId, {
                      valueFormat: "HH:mm:ss",
                      displayFormat: "HH:mm:ss",
                      support2400: true
                  });
              default:
                  throw "Not supported type. Please contact app developer.";
              }
          },
  </code></pre>