Skip to main content
allenp0001
Known Participant
December 18, 2024
Question

Data Entry

  • December 18, 2024
  • 3 replies
  • 0 views

I am in need of creating a basic data entry interface where it is just one text box where the user can input and item number, hit tab, writes to a record , clears out and they are ready for the next item.  Looking for very minimal screen navigation. Thoughts?

3 replies

mathieud0001
December 19, 2024

Something like this?

konduruc733182
December 19, 2024

When you say this

clears out and they are ready for the next item

Do you mean that the user stay on the same screen with a blank box to write new entry? If you want to write records at the same time you would need to use the writeRecords() function within the next button.

Write records in the next button or submit.

a!localVariables(
  local!data: 'recordType!{fb324deb-007c-495f-98dd-65e2ea1e6cdd}KS Record to Delete'(),
  {
    a!textField(
      label: "My Text",
      value: local!data['recordType!{fb324deb-007c-495f-98dd-65e2ea1e6cdd}KS Record to Delete.fields.{6436f9d3-5bce-4f75-b74a-ffa968c3ce41}name'],
      saveInto: {
        local!data['recordType!{fb324deb-007c-495f-98dd-65e2ea1e6cdd}KS Record to Delete.fields.{6436f9d3-5bce-4f75-b74a-ffa968c3ce41}name']
      }
    ),
    a!buttonLayout(
      primaryButtons: {
        a!buttonWidget(
          label: "Submit",
          saveInto: {
            a!writeRecords(
              records: local!data,
              onSuccess: a!save(
                local!data,
                'recordType!{fb324deb-007c-495f-98dd-65e2ea1e6cdd}KS Record to Delete'()
              )
            ),
            /*List a save which will close the user interface that captures the value*/
          },
          submit: true
        ),
        a!buttonWidget(
          label: "Add More",
          submit: false(),
          saveInto: {
            a!writeRecords(
              records: local!data,
              onSuccess: a!save(
                local!data,
                'recordType!{fb324deb-007c-495f-98dd-65e2ea1e6cdd}KS Record to Delete'()
              )
            )
          }
        )
      }
    )
  }
)

Write all values at once in a process.

 

/*Call this interface in a process model to write the records*/

a!localVariables(
  local!value,
  local!data,
  {
    a!textField(
      label: "My Text",
      value: local!value,
      saveInto: { local!value }
    ),
    a!buttonLayout(
      primaryButtons: {
        a!buttonWidget(
          label: "Submit",
          saveInto: {
            a!save(
              local!data,
              append(local!data, local!value)
            ),
            a!save(ri!records, local!data)
          },
          submit: true
        ),
        a!buttonWidget(
          label: "Add More",
          saveInto: {
            a!save(
              local!data,
              append(local!data, local!value)
            ),
            a!save(local!value, null)
          }
        )
      }
    )
  }
)

I would recommend using a process to write the records.

stefanhelzle0001
December 19, 2024

Just create that simple interface, make it the start form of a process, and add this process as an action to your site. This will work exactly as you described.