Share data from a Project Siena app

 

To share data from a Project Siena app with other people:

  • Export your data from one Project Siena app and import it into another.

  • Post your data to a SharePoint list.

  • Share your data through Office 365 Preview (for example, by sending it in an email message).

  • Post your data to Facebook, Twitter, and Instagram.

Get a general overview of Project Siena with links to resources such as sample apps, video tutorials, and forums.

Prerequisites

  • Create your first app to learn how to perform basic tasks, such as adding a control and configuring its properties.

    Important

    If you want to change a property but can't find its icon near the bottom of the screen, click Express View in the lower-right corner. If the list that appears still doesn't show the property you want, click the down arrow under each category to display all properties in that category.

Export and import data

To transfer data to another Project Siena app, first export the data into a compressed file by following the steps in the next procedure. If the target app is on a different device, copy the compressed file to that device. Finally, add an import control to the target app, and configure the control to add the data to a collection in that app.

  1. If you don't have a collection, create one.

  2. Add an export control, and then set its Data property to the collection that you want to export.

  3. Press F5, and then click the export control.

  4. Specify where you want to save the file that contains your data, specify a file name, and then click Save.

    Your data is exported and compressed in a file in the location that you specified.

  5. Press Esc to return to the design workspace.

  6. Add and configure an import control.

Share data in a SharePoint list

Create a SharePoint list

  1. In SharePoint, create a list that's named Locations and that contains columns named Cities and CountriesRegions.

    A SharePoint list with columns named Cities and CountriesRegions

  2. (optional) Add one or more entries to the list.

  3. In the address bar of your browser, copy the URL for the list.

Import the data from SharePoint

  1. In Project Siena, press Alt-D, click SharePoint, and ensure that the appropriate option button is selected for the type of list you created.

  2. Paste the URL for the list into the text box, and then click Connect.

  3. If prompted, provide the requested credentials.

  4. In the list that appears, select the Locations check box, and then click Import data.

  5. When a preview of your list appears, press Esc to return to the design workspace

    A preview of the first few items in the Locations list

Add data

  1. Press Alt-V, and then add two input-text boxes.

  2. Move the second box so it appears just under the first one, and name them City and CountryRegion.

  3. (optional) Set the Hint Text properties for the boxes to show the purpose of each.

  4. Press Alt-V, and add a button.

  5. Set the Text property of the button to Add, and set its OnSelect property to this function:

    Collect(Locations, {Cities:City!Text, CountriesRegions:CountryRegion!Text})

  6. Move the button that you just added so that it appears under the text boxes.

    Two input-text boxes, with hint text, and a button

Add a SharePoint Update control

  1. Press Alt-V, scroll to the bottom of the list that appears, and then add a SharePoint Update control.

    Button to add a SharePoint Update control

  2. Move the control that you just added so that it appears under the other button.

  3. Change the Data Source property of the Update control to Locations.

Test the app

  1. Press F5, and type some text into each box.

    Type text in each input-text box, click Collect, and then click Update.

  2. Click the Add button, and then click the Update button.

  3. Open your SharePoint list in a browser, or refresh the view of that list. (For example, press F5 to refresh the list in Internet Explorer.)

    The list contains a row for the entry you added.

    The SharePoint list contains the new record

Send data in an e-mail message

  1. In a new app, set the OnSelect property of a button to this function:

    Collect(Stock, {Company:"Contoso", Value:"100"}, {Company:"Fabrikam", Value:"75"}, {Company:"AdventureWorks", Value:"130"})

  2. Press F5, click the button, and then press Esc.

  3. Press Alt-V, click Office 365 Preview, and then click Send Message.

    Button to add composite control for sending email

    A composite control appears with labels in which you can specify a recipient, a subject line, and a message body.

    A composite control for sending messages through Office 365 Preview

  4. Click in the label for the recipient, and then type the address of the person or group of people to whom you'll send this message.

  5. Click in the label for the subject line, and then type Buy, sell, or hold?

  6. Select the label for the message body, and set its Default property to this expression:

    "Contoso stock is now at $" & LookUp(Stock, Company="Contoso", Value) & ". What do you want to do?"

    Text between quotations marks (for example, The stock is now at $) appears exactly as you type it. The LookUp function shows the data in the Value column of the Stock collection where the Symbol column contains text that you specify. Ampersands concatenate the other elements.

  7. Press F5, and then click Send.

    After a bit of time, the message appears in the inbox of the person or people to whom you addressed the message.