Home Forums Development CPM Form

Viewing 9 reply threads
  • Author
    Posts
    • #10926
      Sreeejith VRSreeejith VR
      Participant

      CPM Forms Question.

      1. Is it possible to validate the mandatory fields in each save instead at the end of the form.

      2. also ,when we open a page, the mouse cursor focus is not automatically going to the first editable field.user has to click on any field to edit it. is it possible to make this.

      3. is it possible to control the font size and coloring in the form.

      4. is it possible to control the aligment of fields in a page and have ghost text instead of hint.

      0
    • #10943
      Jasper ChowJasper Chow
      Participant

      1. Is it possible to validate the mandatory fields in each save instead at the end of the form.

      @Johnny: Each field is validated immediately on edit. There is no need to validate again on save. To validate all fields without any edits, use the submit button.

       

      2. also ,when we open a page, the mouse cursor focus is not automatically going to the first editable field.user has to click on any field to edit it. is it possible to make this.

      @Jasper: We don’t have this supported. If it is indenified as a general pattern it can be an item on the roadmap. Either framework can support it for expandable area, or provide an API for project level to set focus on first editable field.

       

      3. is it possible to control the font size and coloring in the form.

      @Jasper: We strongly against changing any font size as the controls are built to pixel perfect according to Material Design guideline. Coloring change can be achieved by changing the theme on project level

       

      4. is it possible to control the aligment of fields in a page and have ghost text instead of hint.

      Alignment is automatic based on content type right now. There is future plans to support custom alignment on fields.

      @Jasper: We support hint ( text below the line ) and / or caption ( on the line , and when typing it will move to the top ) So you can choose to use caption only. Now if using caption , but just want to see the caption goes away when user start typing, That is something we can enhance in the future.

      0
    • #10970
      Sreeejith VRSreeejith VR
      Participant

      hi Jasper,

      thanks for the updates. appreciate the help.

      regarding the first question about the validation , actually by validate , i meant to trigger the mandatory check of all the mandatory fields in each page in the page itself when we click on the save button. not at the end of the form.

       

       

      0
      • #11017
        Johnny ZhangJohnny Zhang
        Participant

        This is currently not supported. The user should not be presented with validation errors on fields that have not been answered on a save.

        We are working on features to roll up the error state from the fields to the page icon, to enhance the error indication and user experience.

        0
    • #10979
      Sreeejith VRSreeejith VR
      Participant

      hi,

      is there any way to put debugger in the CPM form ?

      reseed is not working sometimes for the form. we are not seeing the changes after the reseed even though the reseed was successful

       

      0
      • #11026
        Johnny ZhangJohnny Zhang
        Participant

        > is there any way to put debugger in the CPM form ?

        For server-side CPM DSL configuration scripts, you can add (logger’info …) to the code and observe results in the scheme console.

        For client-side code, debug using the Chrome debugger.

        > reseed is not working sometimes for the form

        Could you provide more information? How is the form launched? And how are you reseeding the forms? What is your environment “test” flag?

        0
    • #11035
      Sreeejith VRSreeejith VR
      Participant

      hi Johnny, thanks for the comments.

      seeding is working now. we had some challenges in the local.

      we have few other questions.

      1.  is it possible to refresh the serialized data of the form. we are reading few attributes from the class into the form. but if we change the value of this attribute( data) , its not reflecting in the form. it still shows the old value.
      2.  the document says the question has accessibility across the form.  we have a question defined in one section and we wanted to control the visibility of another section based on the value of first question.  this is not working. please refer to the below code :  question – atpMonthTxnPattern

      (bp:section
      CDDATP2
      (: caption “Please specify Transaction Details by clicking +”)
      (: captions (@ question atpMonthTxnPattern))
      (: collection #t)
      (bp:combo
      atpMonthTxnPattern

      (: caption “Transaction Type”)
      (:
      options
      (collection
      “Cash”
      “Internal transfers”
      “Cheque”
      “Remittance local”
      “Remittance cross border”

      )
      )
      (: sync #f)
      )
      (bp:integer atpValCredit (: caption “Value Credit”) (: sync #f))
      (bp:integer
      atpCreditFreq
      (: caption “Frequency / no. of transactions for Value Credit”)
      (: sync #f)
      )
      (bp:integer atpValDebit (: caption “Value Debit”) (: sync #f))
      (bp:integer
      atpDebitFreq
      (: caption “Frequency / no. of transactions for Value Debit”)
      (: sync #f)
      )

      )

      (bp:section
      atpCrossRelSize
      (bp:integer
      atpTotAllValCredit
      (:
      caption
      “Total Value for all type of CREDIT transactions mentioned in above table:”
      )
      (: value (sum (@ question atpValCredit)))
      (: sync #f)
      )

      (bp:integer
      atpTotAllCreditFreq
      (: caption “Frequency / No. of CREDIT transactions:”)
      (: value (sum (@ question atpCreditFreq)))
      (: sync #f)
      )

      (bp:integer
      atpTotAllValDebit
      (:
      caption
      “Total Value for all type of DEBIT transactions mentioned in above table:”
      )
      (: value (sum (@ question atpValDebit)))
      (: sync #f)
      )

      (bp:integer
      atpTotAllDebitFreq
      (: caption “Frequency / No. of DEBIT transactions:”)
      (: value (sum (@ question atpDebitFreq)))
      (: sync #f)
      )

      (bp:currency
      atpexpRelBal
      (:
      caption
      “Expected eventual size of relationship / Expected balance in the account (AED)”
      )
      (: sync #f)
      )
      (bp:text
      atpRemGeoCredit
      (: visible = “Remittance cross border” (@ question atpMonthTxnPattern))
      ;(: required = “Remittance cross border” (@ question atpMonthTxnPattern))
      (:
      caption
      “In case of cross border remittance please specify the geographies involved.”
      )

       

      Thanks,

      Sreejith VR

      0
      • #11065
        Johnny ZhangJohnny Zhang
        Participant

        > is it possible to refresh the serialized data of the form.

        Make sure the question you want to sync with the class have the “bind” property set.

        E.g. on (bp:flow), set bind property to the class

        and on the question, either rename the question or set bind property to the attribute name

        > visibility for question – atpMonthTxnPattern

        Add a bracket around the “=” function.

        e.g. (: visible (= “Remittance cross border” (@ question atpMonthTxnPattern)))

        0
    • #11044
      Sreeejith VRSreeejith VR
      Participant

      hi,

      how to write  a collection in to an associated class?

      eg : my form is associated with class “class1” and it has an associated attribute  “asc1” to class class2.

      i have a collection in the form collection1 with 5 questions each for the 5 attributes of the class2.  how do i insert this collection to class2?

       

      Thanks,

      Sreejith VR

      0
      • #11074
        Johnny ZhangJohnny Zhang
        Participant

        assume “asc1” is a collection association

        You can try the following:
        (bp:flow
        (: bind class1)
        (bp:section asc1
        (bp:text attribute1 …)
        (bp:text attribute2 …)

        )
        )

         

        0
        • #11084
          Sreeejith VRSreeejith VR
          Participant

          hi Johnny,thanks for the comments.

          actually , i want to commit the form data to the associated class.

          section :-

          form is bind to the class – cddENBD

          CDDRelENBD – is the associated attribute.

          and the below section is a collection.

          (bp:section
          CDDRelENBD
          (: visible (= “Yes” (@ question rpyRelEnbd)))
          (: caption “If Yes, specify account details by clicking +”)
          (:
          captions

          (@ question rpyRelAccName)
          ;(@ question rpyRelCcy)
          ;(@ question rpyRelLoc)

          )
          (: collection #t)

          ;———below fields will be autofetched based on CIF selected
          (bp:text rpyRelAccName (: caption “Account Name”) (: sync #f)) ; reused the extra attribute from ATP “atpChqValDebit”
          (bp:text rpyRelCifNo (: caption “CIF Number”) (: sync #f))

          )

          <hr />

           

          how do  i commit the  value captured by the question – rpyRelAccName

          i am trying something like this.

          (:
          $onSubmit
          (let
          (
          (cddInst
          (read-instance enbd:CDD () `(= (@) ,(string->oid (@ global relatedObjectId))) #f)
          )

          )

          (cddInst’saveCDD
          cddInst
          (: hdrDateOfVisit (@ question hdrDateOfVisit))
          (: hdrTimeOfVisit (@ question hdrTimeOfVisit))
          (enbd:CDDRelENBD’new
          (: rpyRelAccName (@ rel question rpyRelAccName))
          (: rpyRelCifNo (@ rel rpyRelCifNo))
          (: rpyRelCcy (@ question rpyRelCcy))
          (: rpyRelLoc (@ question rpyRelLoc))
          (: rpyRelBu (@ question rpyRelBu))
          (: rpyRelRel (@ question rpyRelRel))
          (: cdd cddInst)
          )
          )

          )
          )

          0
          • #11093
            Johnny ZhangJohnny Zhang
            Participant

            There are a few ways:

            (@ question rpyRelAccName) should be a collection of values

            (let ((accNames (@ question rpyRelAccName)))

            (accNames’get 0) ; returns first value

            )

            (@ section ‘(CDDRelENBD . 0) rpyRelAccName) also returns the same value

            With these, you can get the size of your collection and loop over the values to build the instance, or a more fancy way is to loop over multiple collection values

            (for-each

            (lambda (accName cifNo …)

            (enbd:CDDRelENBD’new

            (: rpyRelAccName accName)
            (: rpyRelCifNo cifNo)

            )

            (@ question rpyRelAccName)

            (@ question rpyRelCifNo)

            )

            0
    • #11055
      Sreeejith VRSreeejith VR
      Participant

      hi ,

      would you be able to provide us some sample forms to help our development?

       

      Thanks,

      Sreejith VR

      0
      • #11103
        Johnny ZhangJohnny Zhang
        Participant

        Check out the documentation here: https://documentation.nexj.com/pubdev9draft/application-services/process-management-services/customer-process-management-cpm/developing-pm-forms

        There are also test forms in the CPM project:

        bpdatatestbind.scm

        bpdatatestquestions.scm

        0
        • #11112
          Sreeejith VRSreeejith VR
          Participant

          hi Johnny,

           

          thanks for the comments.

          its really helpful. one more question . submit button is not coming in my form in the last page. is there any configuration to be done ?  i am attaching the form here.

           

           

          0
          Attachments:
          You must be logged in to view attached files.
          • #11123
            Johnny ZhangJohnny Zhang
            Participant

            This is because your last page is conditionally visible.

            0
          • #11132
            Sreeejith VRSreeejith VR
            Participant

            hi Johnny,

            thanks for the comments.

            the submit button is still not coming. i removed the visibility check from the last page. even created a dummy page at the end . still the submit button is not showing.  the continue button is disabled at the end though.

            0
            Attachments:
            You must be logged in to view attached files.
        • #11160
          Sreeejith VRSreeejith VR
          Participant

          hi, how do i access the CPM project ?

          0
          • #11187
            Johnny ZhangJohnny Zhang
            Participant

            Should be available from the mixin jar.

            0
    • #11142
      Johnny ZhangJohnny Zhang
      Participant

      Is the form created as a “transient” form?

      You can check the “isTransient” attribute on the class.

      0
      • #11151
        Sreeejith VRSreeejith VR
        Participant

        hi, no, there is no attribute like that on the class. checked another class for which Nexj developed the form. there also , couldn’t find this attribute.

        0
        • #11169
          Johnny ZhangJohnny Zhang
          Participant

          The class is bp:Flow.meta

          0
          • #11178
            Sreeejith VRSreeejith VR
            Participant

            hi, yes, isTransient is initialized to #f and there is no value set.

            0
          • #11196
            Sreeejith VRSreeejith VR
            Participant

            hi,checked in the bpflow table. Transient value is 0 for both flows created.

            0
          • #11205
            Johnny ZhangJohnny Zhang
            Participant

            Just checked the code, there is an project level customization. The user needs a specific privilege.

            Search for an attribute with name like “*showSubmit” on bp:Flow.meta.

            0
          • #11214
            Sreeejith VRSreeejith VR
            Participant

            hi Johnny, thanks! , checked with the user with the correct privilege. its showing up. thanks alot for the help.

            0
    • #11242
      Sreeejith VRSreeejith VR
      Participant

      hi, any idea about this error?

      ; 19:35:09,463 ERROR [FlowTemplate] (Thread-0) Flow seeding failed for: ENBD CDD.
      nexj.core.scripting.ScriptingException: Attempt to invoke an unknown method “symbol” on class “nexj.core.meta.Primitive”. (err.scripting.unknownMethod)

      0
      • #11260
        Sreeejith VRSreeejith VR
        Participant

        hi, got it, it was because of the type mismatch of the question – finBgYearsBusi with the class attribute.

        0
    • #11251
      Sreeejith VRSreeejith VR
      Participant

      form

      0
Viewing 9 reply threads
  • You must be logged in to reply to this topic.