1

I have a calculator whose output i need to display on Submit button. The output comes from a decision tree running in Zoho Workflow module using deluge script.

1) Have tried storing the output in workflow as a string and then passing it back to a form field

2) Tried creating a zoho page for output display but unable to link output of workflow and zoho page

if(input.Price > input.Income)
{

    if(input.EMI_Exp < 0.6)
    {
    info "Take the Personal Loan as you can easily manage the EMI. 
    If you choose a credit card then you  will mess your cashflow";
    }
    else
    {
    info "No Personal Loan, No Using Credit Card. You are stretching 
    yourself by purchasing this";
    }
}
else

Need to pass the info information to a decision box ( text) in Zoho form.

1 Answer 1

2

On submit of the form, if you are willing to display a message to the user, you can make use of two things page or stateless form.

Page:

  1. Create a page on creator and names it as Message ( You can name it as you wish )
  2. Add parameters to the page by name recordID ( datatype of the variable is string & can have any name ).
  3. On page fetch record information from the form and using recordID( convert into to long as it is string whereas ID is bigint ). i.e response = FormName[ID == recordID.toLong()]
  4. if(response.EMI_Exp < 0.6)
        {
        %><p>
            Take the Personal Loan as you can easily manage the EMI. <br>
            If you choose a credit card then you  will mess your cashflow
        <p><%
        }
        else
        {
          %>
           <p>
             No Personal Loan, No Using Credit Card. You are stretching 
        yourself by purchasing this
           </p>
          <%
        } 
        }else{
          %>
           <p>
             Thank you!!!
           </p>
          <%
        }```
    
  5. On click of submit button use open url : openUrl("#page:pageLinkName?zc_LoadIn=dialog&recordID="+input.ID,"same window"), using the script you can open a dialog box

Stateless Form:

  1. Create a stateless form ( Name it as Message or anything you want)
  2. Add two field a single-line text field and name it as recordID and note field and keep it empty without any value and name it as Message
  3. On load hide recordID field and using recordID fetch record details i.e
  4. response = FormName[ID == recordID.toLong()];
if(response.Price > response.Income) { 
if(response.EMI_Exp < 0.6)
        {
        input.Message = "Take the Personal Loan as you can easily manage the EMI. 
        If you choose a credit card then you  will mess your cashflow";
        }
        else
        {
        input.Message = "No Personal Loan, No Using Credit Card. You are stretching 
        yourself by purchasing this";
        } }
      else{    input.Message= "Thank you !!!" }
  1. On Submit of calculator form using following script :
    openUrl("#Form:formLinkName?zc_LoadIn=dialog&recordID="+input.ID,
        "same window")```
    , using the script you can open a dialog box
    

Hope this could help you.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.