Zum Hauptinhalt gehen

Pre-populate the default value in display form?

Kommentare

7 Kommentare

  • John Nerge
    You can do this using a runtime modification on your Display Form. Assuming you've already queried the table and gotten results back, then here's what you need to do.

     

    1) Add an Assign activity to the RuntimeModifications for your Display Form.

     

    2) Paste this into the To/left side of the Assign statement:

     

    form.Find(Of TextBoxFormItem)("TextBox1").DefaultText

     

    3) Paste this into the right side of the Assign statement:

     

    YourFeatureSet.Features(0).Attributes("YourFieldNameHere").ToString()

     

    4) Replace the feature set with the name you gave your feature set variable and the field name with the field name you want to use from your table.
    0
  • Permanently deleted user
    Hi John,

     

     

     

    Thank you for the help, works perfectly!
    0
  • Permanently deleted user
    Hi Andreas, I am trying to accomplish the same thing, however, I am having issues getting the default value to display in the text box. Would it be possible to share your workflow? Thank you!
    0
  • Permanently deleted user
    I am having difficulty with pre-populating the combobox and datepicker values.Does anyone have any samples they would be willing to share? Here is what I have so far for my combobox:

     

    Display Name: Assign

     

    To: form.Find(Of ComboBoxFormItem)("ComboBox1").SelectText

     

    Value: permitNo_results.Features.First().Attributes("INFOR_DOU_SERVICE_TYPE").Tostring
    0
  • Permanently deleted user
    Hi Stephanie, I've configured an Assign activity in the Runtime Modifications to pre-populate a date picker...

     

    To: form.Find(of DatePickerFormItem)("DatePick1").InitialDate

     

    Value: Date.Parse(sqlqueryresult.Rows.Item(0).Item("Debris_date").toString())

     

    I'm still figuring this out myself so I hope this helps!
    0
  • Nico Burgerhart
    Instead of .SelectText you should use .SelectedVaule.

     

    SelectText is only an informative message.
    0
  • Luuk Schaminée
    you first have to cast the value (Date.Parse(sqlqueryresult.Rows.Item(0).Item("Debris_date").toString())) to a DateTime object
    0

Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.