Browse All Fiddles


Basket #200058

Created: 1541857620
View "Basket #200058"
<mvt:item name="customfields" param="Write_Product_ID( l.settings:product:id, 'short_name', 'This is an Custom Field' )" /> <mvt:item name="customfields" param="Read_Product_ID( l.settings:product:id, 'short_name', l.settings:product:customfield:short_name )" /> <mvt:if expr="NOT ISNULL l.settings:product:customfield:short_name"> <h1>&mvte:product:customfield:short_name;</h1> </mvt:if>
 

Basket #200056

Created: 1541857575
View "Basket #200056"
<mvt:item name="customfields" param="Write_Product_ID( l.settings:product:id, 'short_name', 'This is short_name Custom Field' )" /> <mvt:item name="customfields" param="Read_Product_ID( l.settings:product:id, 'short_name', l.settings:product:customfield:short_name )" /> <mvt:if expr="NOT ISNULL l.settings:product:customfield:short_name"> <h1>&mvte:product:customfield:short_name;</h1> </mvt:if>
 

Basket #200054

Created: 1541857568
View "Basket #200054"
<mvt:item name="customfields" param="Write_Product_ID( l.settings:product:id, 'an', 'This is short_name Custom Field' )" /> <mvt:item name="customfields" param="Read_Product_ID( l.settings:product:id, 'an', l.settings:product:customfield:short_name )" /> <mvt:if expr="NOT ISNULL l.settings:product:customfield:short_name"> <h1>&mvte:product:customfield:short_name;</h1> </mvt:if>
 

Basket #200052

Created: 1541857566
View "Basket #200052"
<mvt:item name="customfields" param="Write_Product_ID( l.settings:product:id, 'an', 'This is short_name Custom Field' )" /> <mvt:item name="customfields" param="Read_Product_ID( l.settings:product:id, 'an', l.settings:product:customfield:short_name )" /> <mvt:if expr="NOT ISNULL l.settings:product:customfield:short_name"> <h1>&mvte:product:customfield:short_name;</h1> </mvt:if>
 

Basket #200050

Created: 1541857559
View "Basket #200050"
<mvt:item name="customfields" param="Write_Product_ID( l.settings:product:id, 'an', 'This is short_name Custom Field' )" /> <mvt:item name="customfields" param="Read_Product_ID( l.settings:product:id, 'an', l.settings:product:customfield:short_name )" /> <mvt:if expr="NOT ISNULL l.settings:product:customfield:short_name"> <h1>&mvte:product:customfield:short_name;</h1> </mvt:if>
 

Basket #199956

Created: 1541801092
View "Basket #199956"
<mvt:assign name="g.foo" value="'$2.55'" /> <mvt:assign name="g.foo" value="glosub( g.foo, '$' , '' )" /> &mvte:global:foo;
 

Basket #199954

Created: 1541801082
View "Basket #199954"
<mvt:assign name="g.foo" value="'$2.55'" /> &mvte:global:foo; <mvt:assign name="g.foo2" value="glosub( g.foo, '$' , '' )" /> &mvte:global:foo;
 

Basket #199952

Created: 1541801072
View "Basket #199952"
<mvt:assign name="g.foo" value="$2.55" /> &mvte:global:foo; <mvt:assign name="g.foo2" value="glosub( g.foo, '$' , '' )" /> &mvte:global:foo;
 

Basket #199949

Created: 1541801042
View "Basket #199949"
<mvt:assign name="g.foo" value="$2.55" /> <mvt:assign name="g.foo2" value="glosub( g.foo, '$' , '' )" /> &mvte:global:foo;
 

Basket #199947

Created: 1541801034
View "Basket #199947"
<mvt:assign name="g.foo" value="$2.55" /> <mvt:assign name="g.foo" value="glosub( g.foo, '$' , '' )" /> &mvte:global:foo;
 

Basket #199888

Created: 1541792440
View "Basket #199888"
<mvt:assign name="l.days[1]" value="'Sunday'" /> <mvt:assign name="l.days[2]" value="'Monday'" /> <mvt:assign name="l.days[3]" value="'Tuesday'" /> <mvt:assign name="l.days[4]" value="'Wednesday'" /> <mvt:assign name="l.days[5]" value="'Thursday'" /> <mvt:assign name="l.days[6]" value="'Friday'" /> <mvt:assign name="l.days[7]" value="'Saturday'" /> <mvt:assign name="l.settings:days" value="l.days" /> <mvt:foreach iterator="dayOfWeek" array="days" > &mvt:dayOfWeek;<br> </mvt:foreach>
 

Basket #199710

Created: 1541792053
View "Basket #199710"
<mvt:assign name="l.my_value" value="10" /> <mvt:assign name="l.settings:counter" value="0" /> <mvt:while expr="l.settings:counter LE l.my_value"> The value of counter is: &mvt:counter; <br> <mvt:assign name="l.settings:counter" value="l.settings:counter + 1" /> <mvt:if expr="l.settings:counter EQ 4"> - The value of 4 is reached and will continue.<br> <mvt:whilecontinue /> </mvt:if> <mvt:if expr="l.settings:counter EQ 8"> <mvt:whilestop /> </mvt:if> </mvt:while>
 

Basket #199263

Example of Miva_array_Delete
Created: 1541788610
View "Basket #199263"
<mvt:assign name="l.settings:my_array" value="miva_array_deserialize( 'one,two,three,four,five,six' )" /> <mvt:eval expr="decodeattribute(glosub(miva_array_serialize(l.settings:my_array), ',', '<br>'))" /> <hr> <mvt:eval expr="miva_array_delete( l.settings:my_array, 6, 1 )" /> <hr> <mvt:eval expr="decodeattribute(glosub(miva_array_serialize(l.settings:my_array), ',', '<br>'))" />
 

Basket #199261

Example of Miva_array_Delete
Created: 1541788595
View "Basket #199261"
<mvt:assign name="l.settings:my_array" value="miva_array_deserialize( 'one,two,three,four,five,six' )" /> <mvt:eval expr="decodeattribute(glosub(miva_array_serialize(l.settings:my_array), ',', '<br>'))" /> <hr> <mvt:eval expr="miva_array_delete( l.settings:my_array, 6, 1 )" /> </hr> <mvt:eval expr="decodeattribute(glosub(miva_array_serialize(l.settings:my_array), ',', '<br>'))" />
 

Basket #199259

Example of Miva_array_Delete
Created: 1541788582
View "Basket #199259"
<mvt:assign name="l.settings:my_array" value="miva_array_deserialize( 'one,two,three,four,five,six' )" /> <mvt:eval expr="decodeattribute(glosub(miva_array_serialize(l.settings:my_array), ',', '<br>'))" /> ~~~ <mvt:eval expr="miva_array_delete( l.settings:my_array, 6, 1 )" /> ~~~ <mvt:eval expr="decodeattribute(glosub(miva_array_serialize(l.settings:my_array), ',', '<br>'))" />
 

Basket #199256

Example of Miva_array_Delete
Created: 1541788525
View "Basket #199256"
<mvt:assign name="l.settings:my_array" value="miva_array_deserialize( 'one,two,three,four,five,six' )" /> <mvt:eval expr="l.settings:my_array" /> ~~~ <mvt:eval expr="miva_array_delete( l.settings:my_array, 6, 1 )" /> ~~~ <mvt:eval expr="l.settings:my_array" />
 

Basket #199247

Created: 1541788426
View "Basket #199247"
<mvt:assign name="l.settings:attributes[1]:template_code" value="'size'" /> <mvt:assign name="l.settings:attributes[1]:prompt" value="'Select a Size:'" /> <mvt:assign name="l.settings:attributes[2]:template_code" value="'color'" /> <mvt:assign name="l.settings:attributes[2]:prompt" value="'Select a Color:'" /> <mvt:assign name="l.settings:attributes[3]:template_code" value="'foo'" /> <mvt:assign name="l.settings:attributes[3]:prompt" value="'Foo Bar:'" /> <mvt:assign name="l.settings:attributes[4]:template_code" value="'baz'" /> <mvt:assign name="l.settings:attributes[4]:prompt" value="'Baz!:'" /> <mvt:assign name="g.var" value="'foo'" /> POS: <mvt:eval expr="miva_array_search( l.settings:attributes, 1, l.attribute, 'l.attribute:template_code EQ \'' $ g.var $ '\'' )" /> <mvt:eval expr="l.attribute"/>
 

Basket #199033

Created: 1541781563
View "Basket #199033"
<mvt:assign name="l.settings:myvalue" value="'One'" /> <mvt:assign name="l.settings:numbers[1]:code" value="'One'" /> <mvt:assign name="l.settings:numbers[2]:code" value="'Two'" /> <mvt:assign name="l.settings:numbers[3]:code" value="'Three'" /> <mvt:assign name="l.settings:numbers[4]:code" value="'One'" /> <mvt:assign name="l.settings:numbers[5]:code" value="'Five'" /> <mvt:assign name="l.settings:numbers[6]:code" value="'Four'" /> <mvt:assign name="l.settings:numbers[7]:code" value="'Six'" /> <mvt:assign name="l.settings:arrayCount" value="miva_array_elements( l.settings:numbers )"/> <mvt:while expr="l.settings:offset LE l.settings:arrayCount"> <mvt:assign name="l.settings:offset" value="l.settings:offset + 1" /> <mvt:assign name="l.settings:match_index" value="miva_array_search( l.settings:numbers, l.settings:offset, l.element, 'l.element:code EQ \'' $ 'One' $ '\'' )" /> <mvt:if expr="l.settings:match_index GT 0"> <mvt:assign name="l.settings:offset" value="l.settings:match_index" /> Match Index: &mvt:match_index; <mvt:elseif expr="l.settings:match_index EQ 0 AND l.settings:offset GT 1"> No More Matches Found. <mvt:whilestop /> <mvt:else> Zero Matches Found. <mvt:whilestop /> </mvt:if> <br> </mvt:while>
 

Basket #199015

Created: 1541781444
View "Basket #199015"
<mvt:assign name="l.settings:product:code" value="'One'" /> <mvt:assign name="l.settings:codesArray" value="miva_array_deserialize('One,Two,Three,One,Five,Four,Siz')" /> <mvt:assign name="l.settings:match_index" value="miva_array_find( l.settings:product:code, l.settings:codesArray, 1 )"/> Match Index: &mvt:match_index; <hr> <mvt:assign name="l.settings:myvalue" value="'One'" /> <mvt:assign name="l.settings:numbers[1]:code" value="'One'" /> <mvt:assign name="l.settings:numbers[2]:code" value="'Two'" /> <mvt:assign name="l.settings:numbers[3]:code" value="'Three'" /> <mvt:assign name="l.settings:numbers[4]:code" value="'One'" /> <mvt:assign name="l.settings:numbers[5]:code" value="'Five'" /> <mvt:assign name="l.settings:numbers[6]:code" value="'Four'" /> <mvt:assign name="l.settings:numbers[7]:code" value="'Six'" /> <mvt:assign name="l.settings:match_index" value="miva_array_search( l.settings:numbers, 1, l.element, 'l.element:code EQ \'' $ l.settings:myvalue $ '\'' )" /> Match Index: &mvt:match_index; <hr> <mvt:assign name="l.settings:myvalue" value="'One'" /> <mvt:assign name="l.settings:numbers[1]:code" value="'One'" /> <mvt:assign name="l.settings:numbers[2]:code" value="'Two'" /> <mvt:assign name="l.settings:numbers[3]:code" value="'Three'" /> <mvt:assign name="l.settings:numbers[4]:code" value="'One'" /> <mvt:assign name="l.settings:numbers[5]:code" value="'Five'" /> <mvt:assign name="l.settings:numbers[6]:code" value="'Four'" /> <mvt:assign name="l.settings:numbers[7]:code" value="'Six'" /> <mvt:assign name="l.settings:arrayCount" value="miva_array_elements( l.settings:numbers )"/> <mvt:while expr="l.settings:offset LE l.settings:arrayCount"> <mvt:assign name="l.settings:offset" value="l.settings:offset + 1" /> <mvt:assign name="l.settings:match_index" value="miva_array_search( l.settings:numbers, l.settings:offset, l.element, 'l.element:code EQ \'' $ l.settings:myvalue $ '\'' )" /> <mvt:if expr="l.settings:match_index GT 0"> <mvt:assign name="l.settings:offset" value="l.settings:match_index" /> Match Index: &mvt:match_index; <mvt:elseif expr="l.settings:match_index EQ 0 AND l.settings:offset GT 1"> No More Matches Found. <mvt:whilestop /> <mvt:else> Zero Matches Found. <mvt:whilestop /> </mvt:if> <br> </mvt:while> <hr>
 

Basket #199009

Created: 1541781415
View "Basket #199009"
<mvt:assign name="l.settings:product:code" value="'One'" /> <mvt:assign name="l.settings:codesArray" value="miva_array_deserialize('One,Two,Three,One,Five,Four,Siz')" /> <mvt:assign name="l.settings:match_index" value="miva_array_find( l.settings:product:code, l.settings:codesArray, 1 )"/> Match Index: &mvt:match_index; <hr> <mvt:assign name="l.settings:myvalue" value="'one'" /> <mvt:assign name="l.settings:numbers[1]:code" value="'One'" /> <mvt:assign name="l.settings:numbers[2]:code" value="'Two'" /> <mvt:assign name="l.settings:numbers[3]:code" value="'Three'" /> <mvt:assign name="l.settings:numbers[4]:code" value="'One'" /> <mvt:assign name="l.settings:numbers[5]:code" value="'Five'" /> <mvt:assign name="l.settings:numbers[6]:code" value="'Four'" /> <mvt:assign name="l.settings:numbers[7]:code" value="'Six'" /> <mvt:assign name="l.settings:match_index" value="miva_array_search( l.settings:numbers, 1, l.element, 'l.element:code EQ \'' $ l.settings:myvalue $ '\'' )" /> Match Index: &mvt:match_index; <hr> <mvt:assign name="l.settings:myvalue" value="'one'" /> <mvt:assign name="l.settings:numbers[1]:code" value="'One'" /> <mvt:assign name="l.settings:numbers[2]:code" value="'Two'" /> <mvt:assign name="l.settings:numbers[3]:code" value="'Three'" /> <mvt:assign name="l.settings:numbers[4]:code" value="'One'" /> <mvt:assign name="l.settings:numbers[5]:code" value="'Five'" /> <mvt:assign name="l.settings:numbers[6]:code" value="'Four'" /> <mvt:assign name="l.settings:numbers[7]:code" value="'Six'" /> <mvt:assign name="l.settings:arrayCount" value="miva_array_elements( l.settings:numbers )"/> <mvt:while expr="l.settings:offset LE l.settings:arrayCount"> <mvt:assign name="l.settings:offset" value="l.settings:offset + 1" /> <mvt:assign name="l.settings:match_index" value="miva_array_search( l.settings:numbers, l.settings:offset, l.element, 'l.element:code EQ \'' $ l.settings:myvalue $ '\'' )" /> <mvt:if expr="l.settings:match_index GT 0"> <mvt:assign name="l.settings:offset" value="l.settings:match_index" /> Match Index: &mvt:match_index; <mvt:elseif expr="l.settings:match_index EQ 0 AND l.settings:offset GT 1"> No More Matches Found. <mvt:whilestop /> <mvt:else> Zero Matches Found. <mvt:whilestop /> </mvt:if> <br> </mvt:while> <hr>
 

Basket #196253

Created: 1541626120
View "Basket #196253"
<mvt:eval expr="100.50 * 100"/>
 

Basket #196251

Created: 1541626112
View "Basket #196251"
<mvt:eval expr="100.50 ROUND 2"/>
 

Strip multiple characters from string

Cleans the characters defined in "g.needles" from a string using the glosub_array function.
Created: 1541545218
View "Strip multiple characters from string"
<mvt:comment>//define ASCII chars</mvt:comment> <mvt:assign name="g.tab" value="asciichar(9)" /> <mvt:assign name="g.space" value="asciichar(32)" /> <mvt:comment>//define needles and convert to array</mvt:comment> <mvt:assign name="g.needles" value="miva_array_deserialize(g.tab $ ',-,a,' $ g.space)"/> <mvt:assign name="g.haystack" value="'345 a78 797 8a9-a-89-9'"/> <mvt:comment>//sanitize</mvt:comment> <mvt:eval expr="glosub_array(g.haystack, g.needles, null)" />
 

Basket #195836

Cleans spaces, tabs, and dashes from a string. Modify the 'needles' to change what characters will be removed.
Created: 1541545069
View "Basket #195836"
<mvt:comment>//define ASCII chars</mvt:comment> <mvt:assign name="g.tab" value="asciichar(9)" /> <mvt:assign name="g.space" value="asciichar(32)" /> <mvt:comment>//define search & find Arrays</mvt:comment> <mvt:assign name="g.haystack" value="'345 a78 797 8a9-a-89-9'"/> <mvt:assign name="g.needles" value="miva_array_deserialize(g.tab $ ',-,a,' $ g.space)"/> <mvt:comment>//sanitize</mvt:comment> <mvt:eval expr="glosub_array(g.haystack, g.needles, null)" />
 

Basket #195834

Cleans spaces, tabs, and dashes from a string. Modify the 'needles' to change what characters will be removed.
Created: 1541545049
View "Basket #195834"
<mvt:comment>//define ASCII chars</mvt:comment> <mvt:assign name="g.tab" value="asciichar(9)" /> <mvt:assign name="g.space" value="asciichar(32)" /> <mvt:comment>//define search & find Arrays</mvt:comment> <mvt:assign name="g.haystack" value="'345 78 797 89--89-9'"/> <mvt:assign name="g.needles" value="miva_array_deserialize(g.tab $ ',-,' $ g.space)"/> <mvt:comment>//sanitize</mvt:comment> <mvt:eval expr="glosub_array(g.haystack, g.needles, null)" />
 

Basket #195832

Cleans spaces, tabs, and dashes from a string. Modify the 'needles' to change what characters will be removed.
Created: 1541544945
View "Basket #195832"
<mvt:comment>//define ASCII chars</mvt:comment> <mvt:assign name="g.tab" value="asciichar(9)" /> <mvt:assign name="g.space" value="asciichar(32)" /> <mvt:comment>//define search & find Arrays</mvt:comment> <mvt:assign name="g.haystack" value="'345 78 797 89--89-9'"/> <mvt:assign name="g.needles" value="miva_array_deserialize(g.tab $ ',-,' $ g.space)"/> <mvt:assign name="g.replace" value="null"/> <mvt:comment>//sanitize</mvt:comment> <mvt:eval expr="glosub_array(g.haystack, g.needles, g.replace)" />
 

Basket #195830

Cleans spaces, tabs, and dashes from a string. Modify the 'needles' to change what characters will be removed.
Created: 1541544925
View "Basket #195830"
<mvt:comment>//define ASCII chars</mvt:comment> <mvt:assign name="g.tab" value="asciichar(9)" /> <mvt:assign name="g.space" value="asciichar(32)" /> <mvt:comment>//define search & find Arrays</mvt:comment> <mvt:assign name="g.haystack" value="'345 78 797 89--89-9'"/> <mvt:assign name="g.needles" value="miva_array_deserialize(g.tab $ ',-,' $ g.space)"/> <mvt:assign name="g.replace" value="miva_array_deserialize('3')"/> <mvt:comment>//sanitize</mvt:comment> <mvt:eval expr="glosub_array(g.haystack, g.needles, g.replace)" />
 

Basket #195828

Cleans spaces, tabs, and dashes from a string. Modify the 'needles' to change what characters will be removed.
Created: 1541544913
View "Basket #195828"
<mvt:comment>//define ASCII chars</mvt:comment> <mvt:assign name="g.tab" value="asciichar(9)" /> <mvt:assign name="g.space" value="asciichar(32)" /> <mvt:comment>//define search & find Arrays</mvt:comment> <mvt:assign name="g.haystack" value="'345 78 797 89--89-9'"/> <mvt:assign name="g.needles" value="miva_array_deserialize(g.tab $ ',-,' $ g.space)"/> <mvt:assign name="g.replace" value="miva_array_deserialize('')"/> <mvt:comment>//sanitize</mvt:comment> <mvt:eval expr="glosub_array(g.haystack, g.needles, g.replace)" />
 

Basket #195826

Created: 1541544794
View "Basket #195826"
<mvt:comment>//define ASCII chars</mvt:comment> <mvt:assign name="g.tab" value="asciichar(9)" /> <mvt:assign name="g.space" value="asciichar(32)" /> <mvt:comment>//define search & find Arrays</mvt:comment> <mvt:assign name="g.haystack" value="'345 78 797 89--89-9'"/> <mvt:assign name="g.needles" value="miva_array_deserialize(g.tab $ ',-,' $ g.space)"/> <mvt:assign name="g.replace" value="miva_array_deserialize(',,')"/> <mvt:comment>//sanitize</mvt:comment> <mvt:eval expr="glosub_array(g.haystack, g.needles, g.replace)" />