How to add wizard interface in process model.

Hello community,

There are some pages in my wizard interface when I am clicking next button for second page but its not opening and it kicks me out. so how to implement this interface in process model.

Please help me

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer

    Any details, code snippets or screen shots?

    Assuming you have multiple nodes in your process, did you enable chaining?

  • a!localVariables(
      step: 1,
      local!data:rule!CTA_Calculation(origincity: ri!customerAddress.district,destinationcity: ri!receiverAddress.city,quantity: ri!Invoice.quantity,handlingcharges:ri!ProductDetail.handleWithCare,weight: ri!ProductDetail.weight),
      /*local!distance: {*/
      /*if(*/
      /*and(*/
      /*a!isNotNullOrEmpty(ri!SenderAddress.city),*/
      /*a!isNotNullOrEmpty(ri!ReceiverAddress.city)*/
      /*),*/
      /*rule!Ml_Intergration(*/
      /*destinations: ri!ReceiverAddress.city,*/
      /*origins: ri!SenderAddress.city*/
      /*).result.body.rows.elements.distance.text,*/
      /*"0"*/
      /*),*/
      /*},*/
      /*local!charges: {*/
      /*if(*/
      /*a!isNotNullOrEmpty(local!distance),*/
      /*tointeger(local!distance)  ri!ProductDetails.tax  0.5,*/
      /*"0"*/
      /*)*/
      /*},*/
      /*local!tax: (local!charges * 18) / 100,*/
      /*local!total: local!charges + local!tax,*/
      a!formLayout(
        label: "Form",
        contents: {
          a!sectionLayout(
            contents: {
              a!milestoneField(
                label: "Milestone",
                labelPosition: "ABOVE",
                steps: {
                  "Sender",
                  "Sender Address",
                  "Receiver",
                  "Receiver Address",
                  "Product Details",
                  "Invoice"
                },
                links: {},
                active: local!step
              ),
    
            },
    
          ),
          a!columnsLayout(
            columns: {
              a!columnLayout(
                contents: {
                  a!textField(
                    label: "First Name",
                    labelPosition: if(local!step = 6, "ADJACENT", "ABOVE"),
                    showWhen: or(local!step = { 1, 6}),
                    saveInto: ri!customer.firstname,
                    value: ri!customer.firstname,
                    refreshAfter: "UNFOCUS",
                    validations: {},
                    readOnly: local!step = 6,
    
                  ),
                  a!textField(
                    label: "Last Name",
                    labelPosition: if(local!step = 6, "ADJACENT", "ABOVE"),
                    showWhen: or(local!step = { 1, 6}),
                    saveInto: { ri!customer.lastname },
                    value: ri!customer.lastname,
                    refreshAfter: "UNFOCUS",
                    validations: {},
                    readOnly: local!step = 6,
    
                  ),
                  a!radioButtonField(
                    label: "Handle With Care",
                    labelPosition: if(local!step=6,"ADJACENT","ABOVE"),
                    showWhen: or(local!step={5}),
                    value: ri!ProductDetail.handleWithCare,
                    saveInto: ri!ProductDetail.handleWithCare,
                    choiceLabels: {"Yes","No"},
                    choiceValues: {"Yes","No"},
    
                    validations: {},
    
                  ),
                  a!textField(
                    label: "Mobile Number",
                    labelPosition: if(local!step = 6, "ADJACENT", "ABOVE"),
                    showWhen: or(local!step = { 1, 6}),
                    saveInto: { ri!customer.mobileNumber },
                    value: ri!customer.mobileNumber,
                    refreshAfter: "UNFOCUS",
                    validations: {},
                    readOnly: local!step = 6,
    
                  ),
                  a!textField(
                    label: "Id Proof",
                    labelPosition: if(local!step = 6, "ADJACENT", "ABOVE"),
                    showWhen: or(local!step = { 1 }),
                    saveInto: { ri!customer.idProof },
                    value: ri!customer.idProof,
                    refreshAfter: "UNFOCUS",
                    validations: {},
                    readOnly: local!step = 6,
    
                  ),
                  /*a!dateTimeField(*/
                    /*label: "Date &  Time",*/
                    /*labelPosition: if(local!step = 6, "ADJACENT", "ABOVE"),*/
                    /*showWhen: or(local!step = { 1, 6,7 }),*/
                    /*validations: {},*/
                    /*saveInto: ri!Sender.date,*/
                    /*value: ri!Sender.date,*/
                    /*readOnly: local!step = 6,*/
    /**/
                  /*),*/
    
                },
    
              ),
              a!columnLayout(
                contents: {
                  a!textField(
                    label: "State",
                    labelPosition: if(local!step = 6, "ADJACENT", "ABOVE"),
                    showWhen: or(local!step = { 2, 6 }),
                    saveInto: { ri!customerAddress.state },
                    value: ri!customerAddress.state,
                    refreshAfter: "UNFOCUS",
                    validations: {},
                    readOnly: local!step = 6,
    
                  ),
                  a!dropdownField(
                    label: "City",
                    placeholder: "Select City",
                    labelPosition: if(local!step = 6, "ADJACENT", "ABOVE"),
                    showWhen: or(local!step = { 2, 6}),
                    saveInto: { ri!customerAddress.district },
                    value: ri!customerAddress.district,
                    choiceLabels: cons!CTA_Available_Cities,
                    choiceValues: cons!CTA_Available_Cities,
                    disabled: local!step = 6,
                    validations: {},
                    
    
                  ),
                  a!integerField(
                    label: "Pin Code",
                    labelPosition: if(local!step = 6, "ADJACENT", "ABOVE"),
                    showWhen: or(local!step = { 2, 6 }),
                    saveInto: { ri!customerAddress.pinCode },
                    value: ri!customerAddress.pinCode,
                    refreshAfter: "UNFOCUS",
                    validations: {},
                    readOnly: local!step = 6,
    
                  ),
                  a!textField(
                    label: "Street",
                    labelPosition: if(local!step = 6, "ADJACENT", "ABOVE"),
                    showWhen: or(local!step = { 2 }),
                    saveInto: { ri!customerAddress.street },
                    value: ri!customerAddress.street,
                    refreshAfter: "UNFOCUS",
                    validations: {},
                    readOnly: local!step = 6,
    
                  ),
                  a!integerField(
                    label: "House Number",
                    labelPosition: if(local!step = 6, "ADJACENT", "ABOVE"),
                    showWhen: or(local!step = { 2 }),
                    saveInto: { ri!customerAddress.houseNumber },
                    value: ri!customerAddress.houseNumber,
                    refreshAfter: "UNFOCUS",
                    validations: {},
                    readOnly: local!step = 6,
    
                  ),
    
                },
    
              ),
              a!columnLayout(
                contents: {
                  a!textField(
                    label: "First Name",
                    labelPosition: if(local!step = 6, "ADJACENT", "ABOVE"),
                    showWhen: or(local!step = { 3, 6 }),
                    saveInto: { ri!receiver.firstName },
                    value: ri!receiver.firstName,
                    refreshAfter: "UNFOCUS",
                    validations: {},
                    readOnly: local!step = 6,
    
                  ),
                  a!textField(
                    label: "Last Name",
                    labelPosition: if(local!step = 6, "ADJACENT", "ABOVE"),
                    showWhen: or(local!step = { 3, 6}),
                    saveInto: { ri!receiver.lastName },
                    value: ri!receiver.lastName,
                    refreshAfter: "UNFOCUS",
                    validations: {},
                    readOnly: local!step = 6,
    
                  ),
                  a!textField(
                    label: "Mobile Number",
                    labelPosition: if(local!step = 6, "ADJACENT", "ABOVE"),
                    showWhen: or(local!step = { 3, 6 }),
                    saveInto: { ri!receiver.mobileNumber },
                    value: ri!receiver.mobileNumber,
                    refreshAfter: "UNFOCUS",
                    validations: {},
                    readOnly: local!step = 6,
    
                  ),
                  /*a!dateTimeField(*/
                    /*label: "Date &  Time",*/
                    /*labelPosition: if(local!step = 6, "ADJACENT", "ABOVE"),*/
                    /*showWhen: or(local!step = { 3 }),*/
                    /*validations: {},*/
                    /*saveInto: ri!Receiver.reciveon,*/
                    /*value: ri!Receiver.reciveon,*/
                    /*readOnly: local!step = 6,*/
    /**/
                  /*),*/
    
                },
    
              ),
              a!columnLayout(
                contents: {
                  a!textField(
                    label: "State",
                    labelPosition: if(local!step = 6, "ADJACENT", "ABOVE"),
                    showWhen: or(local!step = { 4, 6}),
                    saveInto: { ri!receiverAddress.district },
                    value: ri!receiverAddress.district,
                    refreshAfter: "UNFOCUS",
                    validations: {},
                    readOnly: local!step = 6,
    
                  ),
                  a!dropdownField(
                    label: "City",
                    placeholder: "Select City",
                    labelPosition: if(local!step = 6, "ADJACENT", "ABOVE"),
                    showWhen: or(local!step = { 4, 6 }),
                    saveInto: { ri!receiverAddress.city },
                    value: ri!receiverAddress.city,
                    choiceLabels: cons!CTA_Available_Cities,
                    choiceValues: cons!CTA_Available_Cities,
                    disabled: local!step = 6,
                    validations: {},
    
                  ),
                  a!integerField(
                    label: "Pin Code",
                    labelPosition: if(local!step = 6, "ADJACENT", "ABOVE"),
                    showWhen: or(local!step = { 4, 6 }),
                    saveInto: { ri!receiverAddress.pinCode },
                    value: ri!receiverAddress.pinCode,
                    refreshAfter: "UNFOCUS",
                    validations: {},
                    readOnly: local!step = 6,
    
                  ),
                  a!textField(
                    label: "Street",
                    labelPosition: if(local!step = 6, "ADJACENT", "ABOVE"),
                    showWhen: or(local!step = { 4, 6 }),
                    saveInto: { ri!receiverAddress.street },
                    value: ri!receiverAddress.street,
                    refreshAfter: "UNFOCUS",
                    validations: {},
                    readOnly: local!step = 6,
    
                  ),
                  a!integerField(
                    label: "House Number",
                    labelPosition: if(local!step = 6, "ADJACENT", "ABOVE"),
                    showWhen: or(local!step = { 4, 6 }),
                    saveInto: { ri!receiverAddress.houseNummber },
                    value: ri!receiverAddress.houseNummber,
                    refreshAfter: "UNFOCUS",
                    validations: {},
                    readOnly: local!step = 6,
    
                  ),
                  /*a!textField(*/
                    /*label: "Near By",*/
                    /*labelPosition: if(local!step = 6, "ADJACENT", "ABOVE"),*/
                    /*showWhen: or(local!step = { 4, 6,7 }),*/
                    /*saveInto: { ri!ReceiverAddress.nearby },*/
                    /*value: ri!ReceiverAddress.nearby,*/
                    /*refreshAfter: "UNFOCUS",*/
                    /*validations: {},*/
                    /*readOnly: local!step = 6,*/
    /**/
                  /*),*/
    
                },
    
              ),
              a!columnLayout(
                contents: {
                  a!textField(
                    label: "Product ID",
                    labelPosition: if(local!step = 6, "ADJACENT", "ABOVE"),
                    showWhen: or(local!step = { 5, 6}),
                    saveInto: ri!ProductDetail.id,
                    value: ri!ProductDetail.id,
                    readOnly: local!step = 6,
    
                  ),
                  a!textField(
                    label: "Tax",
                    labelPosition: if(local!step = 6, "ADJACENT", "ABOVE"),
                    showWhen: or(local!step = { 5, 6}),
                    saveInto: ri!Invoice.gst,
                    value: local!data.tax,
                    readOnly: local!step = 6,
    
                  ),
                  a!textField(
                    label: "Weight",
                    labelPosition: if(local!step = 6, "ADJACENT", "ABOVE"),
                    showWhen: or(local!step = { 5,6 }),
                    saveInto: ri!ProductDetail.weight,
                    value:ri!ProductDetail.weight,
                    /*readOnly: local!step = 6,*/
    
                  ),
                  a!textField(
                    label: "Size",
                    labelPosition: if(local!step = 6, "ADJACENT", "ABOVE"),
                    showWhen: or(local!step = { 5 }),
                    saveInto: ri!ProductDetail.size,
                    value: ri!ProductDetail.size,
                    readOnly: local!step = 6,
    
                  ),
    
                  a!integerField(
                    label: "Total",
                    labelPosition: if(local!step = 6, "ADJACENT", "ABOVE"),
                    showWhen: or(local!step = { 5, 6}),
                    saveInto: ri!Invoice.total,
                    value: local!data.total,
                    readOnly: local!step = 6,
    
                  ),
                  a!integerField(
                    label: "Quantity",
                    labelPosition: if(local!step = 6, "ADJACENT", "ABOVE"),
                    showWhen: or(local!step = { 5, 6}),
                    saveInto: ri!Invoice.quantity,
                    value: ri!Invoice.quantity,
                    readOnly: local!step = 6,
    
                  ),
    
                },
    
              ),
    
            }
          )
        },
        buttons: a!buttonLayout(
          primaryButtons: {
            a!buttonWidget(
              label: "Go Back",
              value: local!step - 1,
              saveInto: local!step,
              submit: true,
              style: "PRIMARY",
              loadingIndicator: true,
              showWhen: or(local!step = { 2, 3, 4, 5, 6})
            ),
            a!buttonWidget(
              label: "Next",
              value: local!step + 1,
              saveInto: local!step,
              submit: true,
              style: "PRIMARY",
              loadingIndicator: true,
              showWhen: or(local!step = { 1, 2, 3, 4, 5 })
            ),
            
            a!buttonWidget(
              label: "Submit",
              saveInto: {
                a!save(ri!Invoice.total, local!data.total),
                /*a!save(ri!ProductDetail.handleWithCare, local!data.Handling),*/
                a!save(ri!Invoice.gst, local!data.tax),
                a!save(ri!Invoice.charges,local!data.charges),
                
                a!save(ri!customer.createdBy,user(loggedInUser(),"firstName")),
                a!save(ri!customer.createdAt,now()),
                a!save(ri!customer.modifiedBy,user(loggedInUser(),"firstName")),
                a!save(ri!customer.modifiedAt,now()),
                
                
                
                a!save(ri!receiver.createdBy,user(loggedInUser(),"firstName")),
                a!save(ri!receiver.createdAt,now()),
                a!save(ri!receiver.modifiedBy,user(loggedInUser(),"firstName")),
                a!save(ri!receiver.modifiedAt,now()),
                
                a!save(ri!receiverAddress.createBy,user(loggedInUser(),"firstName")),
                a!save(ri!receiverAddress.createdAt,now()),
                a!save(ri!receiverAddress.modifiedBy,user(loggedInUser(),"firstName")),
                a!save(ri!receiverAddress.modifiedAt,now()),
                
                a!save(ri!ProductDetail.createdBy,user(loggedInUser(),"firstName")),
                a!save(ri!ProductDetail.createdAt,now()),
                a!save(ri!ProductDetail.modifiedBy,user(loggedInUser(),"firstName")),
                a!save(ri!ProductDetail.modifiedAt,now()),
                
                a!save(ri!Invoice.createdBy,user(loggedInUser(),"firstName")),
                a!save(ri!Invoice.createdAt,now()),
                a!save(ri!Invoice.modifiedBy,user(loggedInUser(),"firstName")),
                a!save(ri!Invoice.modifiedAt,now()),
    
              },
              submit: true,
              style: "PRIMARY",
              loadingIndicator: true,
              showWhen: or(local!step = 6)
            ),
    
          }
        )
      ),
    
    )
    I am not using activity chaining.

  • +1
    Certified Lead Developer
    in reply to Sunil

    In line 390 you enabled the submit functionality of the button. Is that by intention? Changing this to false should solve your issue.

Reply Children
No Data