This Action Map exports Perfion data to an Excel-file and related Perfion images to a Windows folder.
This example is provided as inspiration only. It must be adapted to your Perfion environment to work. Perfion Support does not assist with such adaptations. Please contact your Perfion Partner or your Perfion consultant if you need assistance.
Action Map
- All lines containing a Command are created as virtuals. This is a recommended best practice
- The "." in the first From field means "current Perfion database"
- The script used for the Image mapping retrieves the images from Perfion in a specified format, renames all images and saves them to the specified location
Sample data for building Action Map
NOTE: Line breaks are omitted if you paste scripts from the table below directly to an action. In stead, paste script to Notepad++ and then copy from there. That will preserve line breaks when you paste into an action.
| Action Map - From | To | Command | Action | Script | Note |
| . | CoffeeData | SELECT.PERFION | <Query> <Select languages='EN'> <Feature id='*' view='Config' /> </Select> <From id ='100'/> <Where> <Clause id='NoOfCups' operator='>' value='3' /> </Where> </Query> | ||
| table | @FORMAT | ||||
| CoffeeData | Coffee | SELECT | |||
| _Value | ItemNumber | ||||
| ItemName_EN | Name | ||||
| EANCode | EAN | ||||
| HeightCM | Height | ||||
| NoOfCups | Number of cups | ||||
| Image | Product Image | if( !HasValue ) return; string id = Path.GetFileNameWithoutExtension( ""+Value ); var info = Perfion.WriteFile( id:id, file:"{@filename}{@par}", par:"size=300x300&format=jpg&fit=crop", root:"C:/Perfion Data/ActionSources/Export/Images" ); Value = info.OutFileName; | |||
| Coffee | C:\Perfion Data\ActionSources\Export\Coffeedata.xlsx | WRITE.EXCEL |
Comments
0 comments
Please sign in to leave a comment.