Skip to main content
Participating Frequently
February 19, 2022
Solved

Form does not submit in record view

Hello,

Why forms are not submitted in my record views?

I've made an example with a simple interface : 

a!localVariables(
  local!tfiValue:"",
a!formLayout(
  label: "Form",
  contents: {
    a!sectionLayout(
      contents: {
        a!textField(
          label: "Text",
          labelPosition: "ABOVE",
          value: local!tfiValue,
          saveInto: {
            local!tfiValue
          },
          refreshAfter: "UNFOCUS",
          validations: {
            if(local!tfiValue="test","not defined",null)
          },
          validationGroup: "testGrp",
          required:true
        )
      }
    )
  },
  buttons: a!buttonLayout(
    primaryButtons: {
      a!buttonWidget(
        label: "Submit",
        submit: true,
        style: "PRIMARY",
        validate: true,
        validationGroup: "testGrp"
      )
    },
  )
)
)

In the designer it works fine : if the field is empty, the submit tests the value and as it is required the warning appears 

Validation is fine to : 

But, in the application, where this interface is a view from a record, it doesn't submit

Can someone explains this?

(Our goal before this simple test was to save a file in a directory. But as the form is never submitted, the file remains stucked in the temporary folder.)

Thanks for your help.

Regards.

gopalk2865
Participating Frequently
February 20, 2022

Hi , As Stefan already said you cant submit form in record view . If you want to add new record , then create a record action in your record type and if you want to modify any existing details of a record then create a related action and configure your form in the process model.

3 replies

stefanhelzle0001
Brainy
February 19, 2022

That's simple. A record view does not support submitting. Create a related action to do this.

gopalk2865
Participating Frequently
February 20, 2022

Hi , As Stefan already said you cant submit form in record view . If you want to add new record , then create a record action in your record type and if you want to modify any existing details of a record then create a related action and configure your form in the process model.

fredg0001Author
Participating Frequently
February 21, 2022

Thanks for your answers.