2
1
0

I want to have a random save challenge question and I need to pass in the label of the random security question so I can display it to the user for the security question field for the "Save Challenge" dialog.

Unfortunately at this point, none of the data for the form is loaded so I cannot just use something like {{data.template_securityQuestionLabel}}

I figured I would try to pass a label as a URL parameter like the saveChallenge or form referenceNumber parameters but I cannot find a way to pass a custom parameter during the call to Form.submit.

How can this be done?

  1. Tim Stewart

    Hi Blake, is this Maestro? If so, could you add maestro label, thanks.

    Also, (if maestro) could you add a bit more detail about where in the form you are trying to do these calculations, and include a full business rule code example? As it stands, it's a bit hard to picture what's going on. Thanks.

  2. Blake Hunter

    Sorry, yes, this is a Maestro form. The code posted below is when the user clicks on the "Confirm" Button on the "Save Confirm" dialog: generateRandomSecurityQuestion(); Form.submit({'save':'Saved','abandon':'Abandoned'}[item.$$parent.properties.dialogNavButtons], item.properties.legacyMethod, false, item.$$parent.properties.validationRef); function generateRandomSecurityQuestion() { // create an array of populated datafields to choose from // randomly choose a populated datafield as the security question // assign the security question value data.template_securityQuestionValue = data.template_saveEmail; // TODO: make this random console.log("data.template_securityQuestionValue: ", data.template_securityQuestionValue); // assign the field name for the randomly chosen security question to display as a label in the // "Save Challenge" data.template_securityQuestionLabel = "Correo Electronico"; // TODO: make this random console.log("data.template_securityQuestionLabel: ", data.template_securityQuestionLabel); } The goal is to take a random field and use it as the security question for the "Save Challenge" dialog and to be able to dynamically display the label for the security question so they know what to enter on the "Save Challenge" dialog.

  3. Jye Cusch

    Hi Tim, the idea here is to call a dynamic data service when the Save Challenge modal is displayed and a valid tracking code is available. This service will call TM and determine what question the customer should be asked, then update the label of the Security Question Answer, so the customer is asked the correct question.

CommentAdd your comment...

1 answer

  1.  
    1
    0
    -1

    In Maestro you can define Data Extracts for any field that when activated will result in the value of the field being pulled out of the form data at the time of save or submit and available as key/value pairs on your transaction. You do this on the Data tab under Integration:

    In your dynamic data service (assuming Fluent SDK) you can then query the relevant transaction and access these values using:

    txn.formDataMap

    before sending the value back to the form.

    1. Ben Warner

      Hi Blake, did this technique work for you?

    2. Blake Hunter

      Hi Ben, Yes, this was the approach that I used to retrieve my data field used to display a dynamic label.

    CommentAdd your comment...