Rotate device through data table
The orientation option is a constant, set between two predefined constants that are not strings. To allow to rotate a device (portrait/landscape) through the data table, do the following:
-
Set the strings in the data table.
-
Use a string compare for the string with "Portrait".
-
Use a condition:
-
Success: Rotate device to portrait
-
Failure: Rotate device to landscape
-
Attached are the script and the data table that you can import and use:
Copy
<?xml version="1.0" encoding="UTF-8"?>
<table>
<headers>
<column>rotationState</column>
</headers>
<data>
<row>
<cell>Portrait</cell>
</row>
<row>
<cell>Landscape</cell>
</row>
</data>
</table>