Dropdown from DataBase & then fill Text Area

Dropdown from DataBase & then fill Text Area

Comments

  • Hi there-
    I am playing with Decisions demo.And playing with the forms.

    I am trying to populate a dropdown based on the SQL Server column. I have mapped the SQL Server Table to decisions in the integration section.

    I looked at the below link.
    https://documentation.decisions.com/creating-dependent-drop-down-menu-options/
    But I am still not able to figure how to map the column to dropdown values.

    After it gets mapped, I want the corresponding details to be mapped to a text area. So every time the user changes the dropdown value the textarea also change showing the corresponding value from the table.

    I have attached a word file if it helps.

  • If you have already created the integration to your database then you should have a new datatype for the table/query integration. You need to specify this datatype as the datatype of the drop down list. Then you can use the appropriate step under integrations > database > [connection name] to pull in the records from your table. The drop down list will allow you to select a display value which is, in this example, the column value that you want to show in the drop down.

    Once you have the drop down setup and mapped into the second part of this process is to get the selected item to show in the text area. To do this you will need to use a dataflow. These are flows that run on form load/action that can pass data between controls. You will need your flow to take in a single object of your drop down type and output a string. On the output of this step where you have created the string data you can use text merge as the input to format your dataobject into a string with static and dynamic values. Attached below are links to dataflow and textmerge documents.

    dataflow: https://documentation.decisions.com/using-data-grid-selection-data-flow/
    text merge: https://documentation.decisions.com/create-first-text-merge/

  • Hi Will

    thanks for the quick response. Would you please look at the attached document.
    I have tried to put screenshots to show what I did. The dropdown is not getting populated.

    [quote=Will@decisions.com]If you have already created the integration to your database then you should have a new datatype for the table/query integration. You need to specify this datatype as the datatype of the drop down list. Then you can use the appropriate step under integrations > database > [connection name] to pull in the records from your table. The drop down list will allow you to select a display value which is, in this example, the column value that you want to show in the drop down.

    Once you have the drop down setup and mapped into the second part of this process is to get the selected item to show in the text area. To do this you will need to use a dataflow. These are flows that run on form load/action that can pass data between controls. You will need your flow to take in a single object of your drop down type and output a string. On the output of this step where you have created the string data you can use text merge as the input to format your dataobject into a string with static and dynamic values. Attached below are links to dataflow and textmerge documents.

    dataflow: https://documentation.decisions.com/using-data-grid-selection-data-flow/
    text merge: https://documentation.decisions.com/create-first-text-merge/[/quote]

  • You need to use the step that gets created for you query JobNamesFromDB. This is located in the step toolbox(top right of flow designer) in the following path. Integrations/database/sibllyadatabaseconnection/jobsNamesFromDb. This step will return the data from your query into the workflow. You need to go to the jobNamesFromDb input on your form and use the select value mapping option to map the output of your query step into this input on you form. Your drop down list is of type string so you will need to open up your query steps output and select the name list field. Changing the mapping type to select value will allow you to open a new dialogue where you can select available variables in the flow.

    Once you have this new step added and its output mapped into your form you can then run the flow in our debugger. In the flow designer click the Debug Flow button at the top of the designer then click the play icon. This will run the flow and show you the form with the data passed in.

    You have the dataname of your dropdown list correct, you are just missing the step that returns the data.
    [i]edited by Will@decisions.com on 12/2/2017[/i]

  • perfect that worked. I didnt know I had to add the DB step. And the mapping was tricky. But your detailed step helped.

    Now I will try the second step and hope that works. Else I will come back to annoy you.

    [quote=Will@decisions.com]You need to use the step that gets created for you query JobNamesFromDB. This is located in the step toolbox(top right of flow designer) in the following path. Integrations/database/sibllyadatabaseconnection/jobsNamesFromDb. This step will return the data from your query into the workflow. You need to go to the jobNamesFromDb input on your form and use the select value mapping option to map the output of your query step into this input on you form. Your drop down list is of type string so you will need to open up your query steps output and select the name list field. Changing the mapping type to select value will allow you to open a new dialogue where you can select available variables in the flow.

    Once you have this new step added and its output mapped into your form you can then run the flow in our debugger. In the flow designer click the Debug Flow button at the top of the designer then click the play icon. This will run the flow and show you the form with the data passed in.

    You have the dataname of your dropdown list correct, you are just missing the step that returns the data.
    [i]edited by Will@decisions.com on 12/2/2017[/i][/quote]

  • Hi Will-

    I broke it the dropdown control. It was being populated from the DB at Form Load.
    I was working on the second item.
    Please see the attachment for the mapping I have done. The dropdown shows individual characters now as opposed to complete word.
    Need help.

  • The issue here is your use of a converter flow mapping on the input to your Jobs Names from DB input on your form. This looks like a converter flow that is splitting a string by a character and maybe returning the first character only? I am not sure what you are doing with this converter flow here. You do not need a converter flow on this input to be able to map a the selected item in your dropdown to the text area on the form. The type of flow you need here is a data flow. There are many examples of these types of flows in our documentation. These flows can take form component values as inputs and pass data to other form components as outputs. I have attached a screenshot of where you add these types of flow to a form. To get to this view of what I have created a screenshot of. Edit your form, and scroll down on the properties pane about halfway.

    If you export your project and post it here I can provide better guidance to you.

  • This is a 2 part question. I probably should have put in 2 posts to avoid confusion.
    Anyway, I am still stuck on the first question. The first question was about populating the drop-down control from DB at form load.
    It worked earlier but somewhere I broke it while trying to solve the second issue.

    So now the dropdown is NOT showing the words returned in DB step but instead is showing individual characters. Need help to put it back.

    Based on your instructions below.
    [i]On the left side,[/i] [font=sans-serif][quote=][color=#009900]Your drop down list is of type string so you will need to open up your query steps output and select the name list field.[/color][/quote]"[/font]
    [i]On the right side[/i] [font=sans-serif] [color=#339933]"[/color][/font][font=sans-serif][quote=][color=#339933]Changing the mapping type to select value will allow you to open a new dialogue where you can select available variables in the flow[/quote]."[/color][/font]
    [font=sans-serif][color=#339933]
    [/color][/font]
    [font=sans-serif]But I do not see any new dialogue. Instead

Sign In or Register to comment.