Display DataType Item as Dropdown list in Forms

Hi community,

does somebody knows a way to display the DataType 'Item' like a List dropdown?

I currently modify a change process and want to use a team dropdown instead of the current team item selector. Of course I can define a separate list for my teams and use this one for my dropdown. The selected team from the dropdown could than be used as team_id.

But this would require that my teams are duplicated. I have to maintain teams in the List and the Team ItemType. For teams this still would be ok, but I want to do something similar for Identities. 

Any ideas?

Angela

Parents
  • Hi Angela,

    You'll need to write a bit of custom code to use a dropdown field for an Item property, but it's pretty easily possible. You would need to add a new dropdown field to your Form that isn't explicitly linked to any property. You could then use an onLoad or onFormPopulated form event to dynamically set the values of this dropdown field. You'll also need to use an onChange field event to actually set the value of the property on the item after the user makes their selection.

    I'd recommend checking out the first use case in this blog post for some sample code on dynamically setting the values of a dropdown based on an item query. One thing to keep in mind for your use case of using this dropdown for an Item property is that you'll want the value of the list elements you add to be equal to the ID of the team items you populate that list with.


    Chris

    Christopher Gillis

    Aras Labs Software Engineer

Reply
  • Hi Angela,

    You'll need to write a bit of custom code to use a dropdown field for an Item property, but it's pretty easily possible. You would need to add a new dropdown field to your Form that isn't explicitly linked to any property. You could then use an onLoad or onFormPopulated form event to dynamically set the values of this dropdown field. You'll also need to use an onChange field event to actually set the value of the property on the item after the user makes their selection.

    I'd recommend checking out the first use case in this blog post for some sample code on dynamically setting the values of a dropdown based on an item query. One thing to keep in mind for your use case of using this dropdown for an Item property is that you'll want the value of the list elements you add to be equal to the ID of the team items you populate that list with.


    Chris

    Christopher Gillis

    Aras Labs Software Engineer

Children
No Data