Home › Forums › Development › CPM Form
Tagged: Sale iPhone 12 Pro Max
- This topic has 29 replies, 3 voices, and was last updated 5 years, 7 months ago by
Sreeejith VR.
-
AuthorPosts
-
-
July 4, 2019 at 3:17 am #10926
Sreeejith VR
ParticipantCPM 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 -
July 4, 2019 at 1:29 pm #10943
Jasper Chow
Participant1. 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-
July 4, 2019 at 1:36 pm #10954
-
-
July 7, 2019 at 1:40 am #10970
Sreeejith VR
Participanthi 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-
July 8, 2019 at 11:09 am #11017
Johnny Zhang
ParticipantThis 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
-
-
July 7, 2019 at 5:24 am #10979
Sreeejith VR
Participanthi,
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-
July 8, 2019 at 11:15 am #11026
Johnny 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
-
-
July 10, 2019 at 5:34 am #11035
Sreeejith VR
Participanthi Johnny, thanks for the comments.
seeding is working now. we had some challenges in the local.
we have few other questions.
- 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.
- 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-
July 10, 2019 at 10:29 am #11065
Johnny 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
-
July 10, 2019 at 6:21 am #11044
Sreeejith VR
Participanthi,
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-
July 10, 2019 at 10:41 am #11074
Johnny Zhang
Participantassume “asc1” is a collection association
You can try the following:
(bp:flow
(: bind class1)
(bp:section asc1
(bp:text attribute1 …)
(bp:text attribute2 …)
…
)
)0-
July 10, 2019 at 11:35 am #11084
Sreeejith VR
Participanthi 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-
July 10, 2019 at 4:08 pm #11093
Johnny Zhang
ParticipantThere 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
-
-
-
-
July 10, 2019 at 7:26 am #11055
Sreeejith VR
Participanthi ,
would you be able to provide us some sample forms to help our development?
Thanks,
Sreejith VR
0-
July 10, 2019 at 4:12 pm #11103
Johnny Zhang
ParticipantCheck 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-
July 11, 2019 at 9:02 am #11112
Sreeejith VR
Participanthi 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.
0Attachments:
You must be logged in to view attached files.-
July 11, 2019 at 10:45 am #11123
Johnny Zhang
ParticipantThis is because your last page is conditionally visible.
0 -
July 12, 2019 at 11:40 am #11132
Sreeejith VR
Participanthi 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.
0Attachments:
You must be logged in to view attached files.
-
-
July 12, 2019 at 3:53 pm #11160
Sreeejith VR
Participanthi, how do i access the CPM project ?
0-
July 12, 2019 at 4:59 pm #11187
Johnny Zhang
ParticipantShould be available from the mixin jar.
0
-
-
-
-
July 12, 2019 at 12:55 pm #11142
Johnny Zhang
ParticipantIs the form created as a “transient” form?
You can check the “isTransient” attribute on the class.
0-
July 12, 2019 at 1:17 pm #11151
Sreeejith VR
Participanthi, 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-
July 12, 2019 at 4:49 pm #11169
Johnny Zhang
ParticipantThe class is bp:Flow.meta
0-
July 12, 2019 at 4:55 pm #11178
Sreeejith VR
Participanthi, yes, isTransient is initialized to #f and there is no value set.
0 -
July 12, 2019 at 5:00 pm #11196
Sreeejith VR
Participanthi,checked in the bpflow table. Transient value is 0 for both flows created.
0 -
July 12, 2019 at 5:15 pm #11205
Johnny Zhang
ParticipantJust 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 -
July 12, 2019 at 5:25 pm #11214
Sreeejith VR
Participanthi Johnny, thanks! , checked with the user with the correct privilege. its showing up. thanks alot for the help.
0
-
-
-
-
July 17, 2019 at 11:42 am #11242
Sreeejith VR
Participanthi, 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-
July 17, 2019 at 12:39 pm #11260
Sreeejith VR
Participanthi, got it, it was because of the type mismatch of the question – finBgYearsBusi with the class attribute.
0
-
-
July 17, 2019 at 11:43 am #11251
Sreeejith VR
Participantform
0
-
-
AuthorPosts
- You must be logged in to reply to this topic.