{"id":1480,"date":"2011-05-23T09:07:22","date_gmt":"2011-05-23T09:07:22","guid":{"rendered":"https:\/\/www.wapshere.com\/missmiis\/?p=1480"},"modified":"2012-10-19T20:03:07","modified_gmt":"2012-10-19T20:03:07","slug":"generating-a-random-password-with-the-builtin-function-evaluator","status":"publish","type":"post","link":"https:\/\/www.wapshere.com\/missmiis\/generating-a-random-password-with-the-builtin-function-evaluator","title":{"rendered":"Generating a random password with the builtin Function Evaluator"},"content":{"rendered":"<p>We&#8217;ve all found that the Function Evaluator is frustratingly limited, and the only random function is for a number &#8211; so how can you generate a random password?<\/p>\n<p>You can write your own activity, or use <a href=\"http:\/\/www.tools4fim.com\/function-evaluator.aspx\">Tools4FIM<\/a>, but I&#8217;ve been trying to use the OOB activities as much as possible so here&#8217;s what I ended up with.<\/p>\n<p><!--more--><\/p>\n<ol>\n<li>Start with one FE that puts a 100 character\u00c2\u00a0string into [\/\/WorkflowData\/SeedString]. The string should be a random assortment of characters. There are plent of random character generators on the internet you can use to create one.<\/li>\n<li>Follow up with a number of FEs that take sub-strings at random intervals from your seed string, eg:<br \/>\n[\/\/WorkflowData\/s1] = Mid([\/\/WorkflowData\/SeedString],RandomNum(1,99),2)<\/li>\n<li>Then finally concatenate your substrings:<br \/>\n[\/\/WorkflowData\/Password] = [\/\/WorkflowData\/s1] + [\/\/WorkflowData\/s2] + [\/\/WorkflowData\/s3] + &#8230;<\/li>\n<\/ol>\n<p>If you want to ensure there are a mix of upper and lower case you could wrap one or more of the substrings in LowerCase() or UpperCase().<\/p>\n<p>If you want to ensure you have numbers and\/or punctuation then you could start with different seed strings for each character type.<\/p>\n<p>It&#8217;s not pretty but probably ok for most purposes.<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>We&#8217;ve all found that the Function Evaluator is frustratingly limited, and the only random function is for a number &#8211; so how can you generate a random password? You can write your own activity, or use Tools4FIM, but I&#8217;ve been trying to use the OOB activities as much as possible so here&#8217;s what I ended&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"footnotes":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":[]},"categories":[42,45],"tags":[],"class_list":["post-1480","post","type-post","status-publish","format-standard","hentry","category-fim-2010","category-workflow"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/pkp1o-nS","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/posts\/1480","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/comments?post=1480"}],"version-history":[{"count":8,"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/posts\/1480\/revisions"}],"predecessor-version":[{"id":2408,"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/posts\/1480\/revisions\/2408"}],"wp:attachment":[{"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/media?parent=1480"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/categories?post=1480"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/tags?post=1480"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}