We take pride in your success. We let our positivity drive us, day in and out. Talk to us at Mindfire to know us more.

Software Technology Tips

This is a custom lasso tag which takes the name of HTTP-POST or GET parameter (submitted through form-posting for example) as argument and returns a Boolean value to indicate whether that parameter is found. It returns true if a parameter with that name is found in the set of HTTP POST/GET parameters and false if the parameter is not found.

This Lasso custom tag is like isset() function in PHP.

 

<?LassoScript
 
define_tag: 'status', -Required='param';
    local: 'theVar'=(action_params);
    local: 'theRecordMap'= (map);
   
    loop: (#theVar->size);
      local: 'tempElement'=(#theVar->(get: (loop_count)));
      #theRecordMap->(insert: (#tempElement->First)=(#tempElement->Second));
    /loop;
 
    local: 'keys' = #theRecordMap->keys;
    local: 'status' = 'false';
 
   loop: (#keys->size);
      if: (#keys->(get:loop_count)==#param);
          local: 'status'='true';
      /if;
   /loop;
 
 return: #status;
/define_tag;
?>


Sample Usage script
if((status: -param='age')=='true');
  Variable: 'agerange' = (Action_Param:'age');
 /if;


Related Tags:

Lasso

Author: Subranil Dalal

top

Related Pages

  • Lasso Consulting India
  • Lasso Development Projects

Lasso

Let us Connect!

privacy

copyright (c) Mindfire Solutions 2007-2012. Login