StringFormatter Block

Modified: 2008/09/22 09:29 by johnmont - Categorized as: Blocks, Popfly Blocks
Formats a row or rows of block data in any way.

Edit

Operations

Edit

formatRow

Format a single row of block data in any way. For example, you can use this to insert html into the Virtual Earth description field. To insert a field, choose the block, the output, and click add. The field will be inserted at the text cursor. Click the help icon for more information

Inputs

NameDescription

Outputs

Name

Edit

formatAllRows

Format all rows of block data in any way. To insert a field, choose the block, the output, and click add. The field will be inserted at the text cursor. Click the help icon for more information.

Inputs

NameDescription

Outputs

Name


Edit

Example

The StringFormatter makes it simpler to change the appearance of text as it passes from one block to another using HTML tags. As an example create a mashup with the Flickr, StringFormatter, and Virtual Earth blocks. In this example, we will italicize the titles coming out of Flickr and being displayed in Virtual Earth.

Connect Flickr to StringFormatter and to Virtual Earth, and connect StringFormatter to Virtual Earth.

Now zoom into the StringFormatter block. You'll see that it has dropdowns to choose fields from its input blocks. In the text box, type . Now leave the default settings (Block = Flickr and Value = title) and click add. Now add the closing tag -- . This will italicize the title coming in from Flickr. Click OK.

Zoom into the Virtual Earth Block. In the title field, click on the dropdown under the source for title and select StringFormatter. Leave settingi as output string. Click OK.

Now run the mashup: you'll see that the titles coming in from Flickr are italicized.

Edit

Objects

Details about type definitions can be found on the Block Metadata Type System page.

Privacy. Terms of Use. Trademarks.
ScrewTurn Wiki version 2.0.22. Some of the icons created by FamFamFam.