Drag and Drop
In this video we will explore the ability to drag records over another record and have an action fire.
- Open the Contacts stream configuration form
- Add a new attribute:
- Name: ReportsTo
- Length: 100 – This is required as we will be combining two 50 character fields into this attribute.
- Add the new attribute to the Contacts view
- Create a Drag Type – This determines what data should be expected when it receives a dragged item i.e. a contact.
- Name: Contact
- Description: A description of what this will be used for
- Save your changes
- Create an Action back on the Contacts stream
- Name: ContactReportsTo
- Confirmation Message section
- Ask For Confirmation: Tick
- Confirmation Message: "Are you sure you want to set Reports To?"
- Stream Item Action Rules section
- Add a new Stream Item Action Rule
- Add a new Stream Item Action
- Name: ContactReportsTo
- Stream Item Action: Update
- Filter Type: Dragged Items
- Copy Values By Name: Untick – this is required as you want to set only one value programmatically
- Attributes to Update
- Name: ReportsTo
- Expression: _form.FirstName+" "+_form.FamilyName
- Create a Drop Target -
- Name: ReportsTo
- DragType: Contact
- Action: ContactReportsTo
- Update the Refresh Actions
- Add the Action ContactReportsTo
Go into App Mode. Drag one contact onto another and the Reports To attribute will be populated.