Create an Action to Open an Add Data Form
You can create an action to open an Add Data Form with the SDK or use Shell Design. For more information about Data Form Specs, see Data Form Specs. For more information about Shell Design, see Data Forms and Shell Design.
SDK Page Spec
For a new pages, create a Page Spec. Otherwise open the source XML for the Page Spec to which to add the action. You can add actions to page action groups or to sections.
Page Action Group
Pages can optionally contain page action groups. Each page action group has a caption and can contain actions. In web shell, page action groups are shown on the left-hand side of the application.
Within the PageActionGroups element, look for the PageActionGroup to which to add the action. If the PageActionGroups does not exist or the desired PageActionGroup does not exist, add it. If the PageActionGroup element does not contain an Actions element, add it.
<PageActionGroups>
<PageActionGroup ID="861b7a8f-2466-4775-8c0d-c59b80f3c022"
Caption="Tasks"
ImageKey="RES:Tasks">
<Actions>
</Actions>
</PageActionGroup>
</PageActionGroups>
Within the Actions element, add an Action element. Minimally add a caption for the action and generate a GUID and use it for the ID attribute's value.
<Actions> <Action Caption="Open" ID="986D410F-4ACA-4F26-8E86-9551CE67EAC0"> </Action> </Actions>
Within the Action element, add a ShowAddDataForm element. Minimally find the data form instance ID for the Add Data Form to open and set the DataFormID attribute for ShowAddDataForm to the data form instance ID.
<Actions> <Action Caption="Open" ID="986D410F-4ACA-4F26-8E86-9551CE67EAC0"> <common:ShowAddDataForm DataFormID="62CCA011-4E4A-4CAA-9881-2E0DE17071E4"/> </Action> </Actions>
Note: Within the ShowAddDataForm element, you can add action context, data form default values, and post-action events.
Build the catalog assembly and deploy it. If this is a new page, load the catalog item.
Tab Section
Pages contain tabs and tabs contain sections. Sections can have actions. Actions in sections are shown at the top of the section.
Within the Section element, look for the Actions element. If it does not exist add:
<Actions></Actions>
Within the Actions element, add an Action element. Minimally add a caption for the action and generate a GUID and use it for the ID attribute's value.
<Actions> <Action Caption="Open" ID="986D410F-4ACA-4F26-8E86-9551CE67EAC0"> </Action> </Actions>
Within the Action element, add a ShowAddDataForm element. Minimally find the data form instance ID for the Add Data Form to open and set the DataFormID attribute for ShowAddDataForm to the data form instance ID.
<Actions> <Action Caption="Open" ID="986D410F-4ACA-4F26-8E86-9551CE67EAC0"> <common:ShowAddDataForm DataFormID="62CCA011-4E4A-4CAA-9881-2E0DE17071E4"/> </Action> </Actions>
Note: Within the ShowAddDataForm element, you can add action context, data form default values, and post-action events.
Build the catalog assembly and deploy it. If this is a new page, load the catalog item.
Shell Design
For a new pages, create a page from Shell Design. Otherwise open the page to which to add the action and toggle Design Mode on. You can add actions to page action groups or to sections.
To edit page properties open the Edit page screen or create a new page with the Add a page screen. For new pages, you can click Add on the Page tab of the Shell Design page in Administration. For existing pages, you can select to edit the page from the Page tab of the Shell Design page or with Design Mode on, you can drill to various properties screens for the page.
Page Action Group
-
If starting with Edit page or Add a page, click the ellipses in the Tabs field under Page. The Tabs screen appears.
-
Click Add or highlight a tab and click Edit. The Tab screen appears.
-
If adding a tab, under Appearance, from Caption, enter a caption.
-
Click the ellipses in the Sections field under Sections.
-
Click Add or highlight a section and click Edit. The Edit section screen appears.
-
Click the ellipses in the Actions field under Actions. The Actions screen appears.
-
Click Add or highlight an action and click Edit. The Edit action screen appears.
-
Under Appearance, from Caption, enter a caption.
-
Under Appearance, from ActionType, select ShowAddDataForm.
-
Under Data form, from DataForm, search for and select a data form instance.
-
Click OK through each of the screens and save the page.
Tab Section
-
If starting with Edit page or Add a page, click the ellipses in the ActionGroups field under Page. The ActionGroups screen appears.
-
Click Add or highlight an action group and click Edit. The Action group screen appears.
-
If adding an action group, under Appearance, from Caption, enter a caption.
-
Click the ellipses in the Actions field under Actions. The Actions screen appears.
-
Click Add or highlight an action and click Edit. The Edit action screen appears.
-
Under Appearance, from Caption, enter a caption.
-
Under Appearance, from ActionType, select ShowAddDataForm.
-
Under Data form, from DataForm, search for and select a data form instance.
-
Click OK through each of the screens and save the page.