Tuesday, October 19, 2021

Scrum Master

I got these two certificates with one year apart, Al Hamd Lellah.



Mainly the same thing from two different organizations. Good information, but if you haven't before, please check my post about Scrum, Scouting and Micro Financing https://omourad.blogspot.com/2025/07/scrum-scouting-and-micro-financing.html

Monday, March 02, 2020

Scrum, Scouting and Micro Financing


I was learning about Scrum to get ready for the Professional Scrum Master exam, I found myself already familiar with most of the how to, as we were practicing it for years, but studying to be prepared for an exam or to give a presentation makes you focus more on the details.

I am a scouter (adult boy scout) who started as a Cub Scout back in Egypt, played several roles, as scout, Patrol Leader, Junior Assistant Scoutmaster, then Senior Patrol Leader for our Rovers team where we won the first prize at the capital level for the first time and for several years after. I then earned my Wood Badge as Assistant Team Leader, then again from the US while rebuilding a cub scout unit as Cubmaster, then joined the Wood Badge staff twice. Wood Badge is the highest and most advanced training course offered to scout leaders by the Boy Scouts of America and many other countries.

I found a great relation between Scrum and what we already have in scouting. But I was surprised when Jeff Sutherland, the co-creator of Scrum, mentioned that he was inspired by the micro financing and Grameen banking founded by Professor Muhammad Yunus in Bangladesh. After finishing “The Art of Doing Twice the Work in Half the Time” by Jeff Sutherland, I started the “Banker of the Poor” by Muhammad Yunus, where I found relation again between his way of fighting poverty and what we do in software development and in scouting.

The common points between Scrum, Scouting and Micro Financing are many, but the main ones as I understand, can be summarized in:

1.   Teams and Groups

They all depend on small groups as building blocks, without it you have nothing. Grameen group of 5, Scrum Development Team from 3 to 9, Boy Scout Patrol 6 to 8. “The patrol method isn’t one way to run a troop. It’s the only way” Lord Baden-Powell, the founder of the scout movement. These groups work together as one entity with common goal, to succeed as a team to reach their destination. If one individual has a problem, everyone in his team rushes to guide, help and support.

In Grameen no one tells the borrowers what businesses they have to do, they are trusted to use the loan in the best way to save themselves from poverty, their team members though have the responsibility of approving the loans. In Scrum, the development team plan their sprint, and it is the responsibility of them all to achieve the sprint goal. The Patrol Leaders Council in the boy scout troop plan their annual activities, they are elected by their patrols and trusted to put the most fun and exciting program. When it is time to put their camp down, they say “Everyone is a Quartermaster!”, which is very similar to the cross functional teams in Scrum.

2.   Values and principles

Without Courage, Commitment, Focus, Openness and Respect there is no Scrum Team. Grameen groups must follow these four principles: Discipline, Unity, Courage and Hard work. While the Scout Law states that the Scout is Trustworthy, Loyal, Helpful, Friendly, Courteous, Kind, Obedient, Cheerful, Thrifty, Brave, Clean, and Reverent.

The individuals within the team do their best to follow these values and principals, they also work together on enhancing their understanding and practicing of them while in the process. This was actually the first thing that grabbed my attention to the similarity between Scouting and Scrum, and then Grameen, they not just focus on the values as a way to succeed, they all have methods to instill these values into the members over time, in Scrum this is part of the adaptation.

3.   Servant Leadership

The leaders supporting and guiding the teams are not there to manage, they are there to coach, mentor and remove impediments. Servant leaders focus on the team and individuals, beside their own vision to how success may looks like for a team, they help each individual be successful in his tasks and duties, and may also help him build his own vision, help him move through the "Shu Ha Ri" stages.

While it is human nature, people like to tell others what to do than to be told what to do, servant leaders made the choice to lead by giving more than they receive. Scouts practice servant leadership in their everyday activities, they learn how to delegate and work together as a team, they learn how to guide and lead while giving everyone the chance to have the feeling that they find the way themselves, a Leave No Trace in another way.

The money lender feels proud after lifting a poor person from poverty, as a servant leader he knows what it means to that borrower to feel proud of himself by doing all he can do himself once given the opportunity.

One way to describe a Scrum master is that he is NOT a manager, there is no managing people in scrum, only mentoring, encouraging, empowering and enabling. In scouting this is summarized in the EDGE method as Explain, Demonstrate, Guide and Enable.

4.   Learn by Doing

In scouting, it is a boy lead program, it may be the only program that allows youth to fail to learn from their failure themselves, in many cases things look very messy and discourages parents, but servant leaders understand that this is the way to build future leaders.

In Scrum, the empirical process is a key, learning by doing and testing, through transparency, inspection and adaptation. Plans are created based on what we tried to do and what we learned while doing it.

With micro finance, credit is given into small amounts, as much as needed to take a step, the borrower adjusts his future financing plans based on what was accomplished. This is the opposite of the mega projects that usually organizations do for rural areas, and then discovering that this project is not what this area really needs.

5.   The Methods

Eight methods in scouting help in achieving the goals, outdoor programs, uniform and leadership development are just examples. “Do a Good Turn Daily”, the scout slogan, is an important part of the Personal Growth method, it is not the same as doing a big service project monthly, or weekly, it is a small daily act of kindness to refresh the commitment and to participate in the incremental added value to our life. Scoutmaster conferences are about 10 minutes long and Board of Reviews about 15 to 20 minutes long are also an opportunity for transparency and inspection that leads to adaptation. After each event the scouts should do a Start-Stop-Continue exercise.

When Grameen and micro financial started in the beginning, the borrower was asked to do a daily payment to settle their loan, later it was changed to weekly payments as a team, the team meet and discuss the progress, make payments and agree on future financial plans. This small incremental progress and meeting with the team is a key to the program, even if you can not make the full payment, you still need to meet and discuss and seek guidance.

In Scrum similar methods are named events, like the sprint planning, sprint review, sprint retrospective and the daily Scrum meeting. The daily Scrum meeting is a 15 minutes long meeting, where the team members mention what they accomplished, what they are planning to work on next, and if they have any impediments. The retrospective meeting is similar to the Start-Stop-Continue exercise in scouting. The same as the Scoutmaster conference, the Scrum master does a one to one meeting with each team member which is a coaching opportunity, but also a two-way feedback.

In scouting “Feedback is a gift, it’s truly is!”, the leaders including youth, learn how to give feedback, learn about the “I Language/Message”, learn about the Tuckman’s stages of group development, effective listening and how to manage conflicts.

6.   Definition of Success

Not talking here about the definition of done in Scrum, which is really important. But the definition of success as the ability of a team to deliver incremental completed “done” value to the market or the user. The end product delivered may vary completely from the initial idea, but the success at the end is to deliver what is really needed by the end user. For financial or any other organizational problems, teams may be stopped from delivering the end product, but having a team that is able to deliver, is a success.

Most financial institutions in the loan market focus on how much interest will be collected. In Micro Financing, ending poverty in a certain area is great, but building the individual who knows how to be a team member, knows how to come out of poverty and help others, is the main success. "Give a man a fish and you feed him for a day; teach a man to fish and you feed him for a lifetime." Moses ben Maimon.

Scouting is the same, it is not about the destination, but the journey. People usually get confused between the scouting methods, like the scouting activities and advancements, and scouting aims like character development, citizenship training, leadership, and mental and physical fitness. So, success in scouting is not measured by how many scouts reached Eagle rank, but their ability to help themselves, their families and serve their community and their country heartfully.

Wednesday, December 11, 2019

Export Online SharePoint Term Store Data to CSV Files


#Set the variables
$siteCollectionUrl = "https://TENANT.sharepoint.com/sites/SITE_COLECTION"
$folderPath = "D:\Terms\Export\"
$termGroupName = "GROUP_NAME"

# Check if you have the Online SharePoint Powershell and 
# SharePoint PnP PowerShell Online modules installed or not
Get-Module -Name Microsoft.Online.SharePoint.PowerShell -ListAvailable | Select Name,Version
Get-Module -Name SharePointPnPPowerShellOnline -ListAvailable | Select Name,Version

# Uncomment these lines if not installed already
#Install-Module -Name Microsoft.Online.SharePoint.PowerShell
#Install-Module SharePointPnPPowerShellOnline

# Connect to your site (I am using the WebLogin for the two-factor authentication):
Connect-PnPOnline -Url $siteCollectionUrl -UseWebLogin

# Get the group you want to export its term sets
$termGroup = Get-PnPTermGroup -GroupName $termGroupName -Includes TermSets

# Loop over the Term Sets
foreach ($termSetItem in $termgroup.TermSets)
{    
    write-host "Working on Term Set:"$termSetItem.Name "[" $termSetItem.Id "]"

    # The Collection that will hold the Terms in this Term Set
    $collection = @()

    # Load the Term Set
    $termSet = Get-PnPTermSet -TermGroup $termGroup -Identity $termSetItem.Id -Includes Terms

    # Create the object and add it to the collection
    $termData = new-object PSObject
    $termData | Add-member -membertype NoteProperty -name "Term Set Name" -Value $termSet.Name
    $termData | Add-member -membertype NoteProperty -name "Term Set Description" -Value $termSet.Description
    $termData | Add-member -membertype NoteProperty -name "LCID" -Value ""
    $termData | Add-member -membertype NoteProperty -name "Available for Tagging" -Value "TRUE"
    $termData | Add-member -membertype NoteProperty -name "Level 1 Term" -Value ""
    $termData | Add-member -membertype NoteProperty -name "Level 2 Term" -Value ""
    $termData | Add-member -membertype NoteProperty -name "Level 3 Term" -Value ""
    $collection += $TermData    

    # Loop over the Terms Level 1
    foreach ($termItem1 in $termSet.Terms)
    {
        # Load the Level 1 Term
        $term1 = Get-PnPTerm -TermGroup $termGroup -TermSet $termSetItem.Id -Identity $termItem1.Id -Includes Terms        
        
        # Create the object and add it to the collection
        $term1Data = new-object PSObject
        $term1Data | Add-member -membertype NoteProperty -name "Term Set Name" -Value ""
        $term1Data | Add-member -membertype NoteProperty -name "Term Set Description" -Value ""
        $term1Data | Add-member -membertype NoteProperty -name "LCID" -Value ""
        $term1Data | Add-member -membertype NoteProperty -name "Available for Tagging" -Value "TRUE"
        $term1Data | Add-member -membertype NoteProperty -name "Level 1 Term" -Value $term1.Name
        $term1Data | Add-member -membertype NoteProperty -name "Level 2 Term" -Value ""
        $term1Data | Add-member -membertype NoteProperty -name "Level 3 Term" -Value ""
        $collection += $term1Data

        # Loop over the Terms Level 2
        foreach ($termItem2 in $term1.Terms)
        {
            # Load the Level 2 Term
            $term2 = Get-PnPTerm -TermGroup $termGroup -TermSet $termSetItem.Id -Identity $termItem2.Id -Includes Terms        
        
            # Create the object and add it to the collection
            $term2Data = new-object PSObject
            $term2Data | Add-member -membertype NoteProperty -name "Term Set Name" -Value ""
            $term2Data | Add-member -membertype NoteProperty -name "Term Set Description" -Value ""
            $term2Data | Add-member -membertype NoteProperty -name "LCID" -Value ""
            $term2Data | Add-member -membertype NoteProperty -name "Available for Tagging" -Value "TRUE"
            $term2Data | Add-member -membertype NoteProperty -name "Level 1 Term" -Value $term1.Name
            $term2Data | Add-member -membertype NoteProperty -name "Level 2 Term" -Value ""
            $term2Data | Add-member -membertype NoteProperty -name "Level 3 Term" -Value ""
            $collection += $term2Data

            # Loop over the Terms Level 3
            foreach ($termItem3 in $term2.Terms)
            {
                # Load the Level 3 Term
                $term3 = Get-PnPTerm -TermGroup $termGroup -TermSet $termSetItem.Id -Identity $termItem3.Id -Includes Terms        
        
                # Create the object and add it to the collection
                $term3Data = new-object PSObject
                $term3Data | Add-member -membertype NoteProperty -name "Term Set Name" -Value ""
                $term3Data | Add-member -membertype NoteProperty -name "Term Set Description" -Value ""
                $term3Data | Add-member -membertype NoteProperty -name "LCID" -Value ""
                $term3Data | Add-member -membertype NoteProperty -name "Available for Tagging" -Value "TRUE"
                $term3Data | Add-member -membertype NoteProperty -name "Level 1 Term" -Value $term1.Name
                $term3Data | Add-member -membertype NoteProperty -name "Level 2 Term" -Value $term2.Name
                $term3Data | Add-member -membertype NoteProperty -name "Level 3 Term" -Value $term3.Name
                $collection += $term3Data
            }
        }
    }

    # Build the file path, I am using the Term Set name as the filename
    $filePath = $folderPath + $termSet.Name + ".csv"

    # Write to the file
    $collection | Export-csv $filePath -notypeinformation
}

Monday, March 13, 2017

Wood Badge

Received The Wood Badge for the second time yesterday. The first time was from Egypt 2002. I am also honored to be invited to join the staff for next course this spring.



For those who don't know what the Wood Badge is, check the below brief:

Wood Badge is the highest and most advanced training course offered by the Boy Scouts of America. While it is rich in scouting history and tradition, participants will spend 6 full days and nights learning modern leadership theories from contemporary scholars such as Ken Blanchard (author of the One Minute Manager series of books), Stephen R. Covey (author of The Seven Habits of Highly Effective People and Principle-Centered Leadership), and Spencer Johnson (author of Who Moved My Cheese). A complete set of references can be found at the end of this document.

Wood Badge has five Central Themes that encapsulate the course content. These are:

  • Living the Values
    • Values, mission, and vision
    • Aims and methods

  • Bringing the Vision to Life
    • Listening to learn
    • Communicating
    • Giving and receiving feedback
    • Valuing people and leveraging diversity
    • Coaching and mentoring

  • Models for Success
    • High Performance Teams
    • Team Development Model
    • Team Leadership Model
    • Situational Leadership

  • Tools of the Trade
    • Project planning
    • Problem solving and decision making
    • Managing conflict
    • Assessing team performance
    • Self-Assessment
    • Managing change
    • Celebrating team success

  • Leading to Make a Difference
    • Leaving a legacy
    • The greatest leadership secret


These workshops are taught through lecture, group discussion, hands on exercises, and through the creation of goals that apply the leadership training received. At the conclusion of the course, attendees will have created at least 5 goals. A counselor will be assigned to work with each attendee for 18 months to ensure application of the training they received and the completion of the 5 goals.

Dr. Blanchard’s courses and workshops, offered through The Ken Blanchard Companies, run $500 per day ($3000 for 6 days). The Boy Scouts of America have negotiated royalty fees and intellectual property rights which allows them to offer the entire 6-day course for just under $230. 

Leaders at many companies (such as IBM, Motorola, and Intel) have recognized the value this training is to their employees. As such, many agree to pay the course fees and/or give time off as part of their employee’s professional development and training plan. Individual company policies vary, however. If you would like additional information, please feel free to contact the Boy Scouts of America, Atlanta Area Council at (770) 989-8820. Or, visit http://www.atlantabsa.org/training/wood-badge/6412.

Wood Badge Training Resources

  • Learning to Lead: A Workbook on Becoming a Leader
    • by Warren Bennis,‎ Joan Goldsmith
    • https://www.amazon.com/Learning-Lead-Workbook-Becoming-Leader/dp/0465018866
  • Managing People is Like Herding Cats
    • by Warren Bennis
    • https://www.amazon.com/Managing-People-Like-Herding-Cats/dp/189000961X
  • Old Dogs, New Tricks: On Creativity and Collaboration
    • by Warren Bennis
    • https://www.amazon.com/Old-Dogs-New-Tricks-CollaborationBennis/dp/1890009342
  • On Becoming a Leader
    • by Warren Bennis
    • https://www.amazon.com/Becoming-Leader-Warren-Bennis/dp/0465014089
  • Why Leaders Can't Lead: The Unconscious Conspiracy Continues
    • by Warren Bennis
    • https://www.amazon.com/Why-Leaders-Cant-Lead-Unconscious-ebook/dp/B00ZDS94K6
  • Leadership by the Book: Tools to Transform Your Workplace
    • by Ken Blanchard,‎ Bill Hybels,‎ Phil Hodges
    • https://www.amazon.com/Leadership-Book-Tools-Transform-Workplace/dp/0688172393
  • Empowerment Takes More than a Minute
    • by Ken Blanchard,‎ John P. Carlos,‎ Alan Randolph
    • https://www.amazon.com/Empowerment-Takes-More-Than-Minute/dp/1576751538
  • The 3 Keys to Empowerment: Release the Power Within People for Astonishing Results
    • by Ken Blanchard,‎ John P. Carlos,‎ Alan Randolph
    • https://www.amazon.com/Keys-Empowerment-Release-Astonishing-Results/dp/1576750604
  • High Five! The Magic of Working Together
    • by Ken Blanchard,‎ Sheldon Bowles
    • https://www.amazon.com/High-Five-Magic-Working-Together/dp/0688170366
  • The Power of Ethical Management
    • by Norman V Peale,‎ Ken Blanchard
    • https://www.amazon.com/Power-Ethical-Management-Norman-Peale/dp/0688070620
  • The One Minute Manager Builds High Performing Teams
    • by Ken Blanchard,‎ Eunice Parisi-Carew,‎ Donald Carew
    • https://www.amazon.com/Minute-Manager-Builds-Performing-Teams/dp/0061741205
  • Leadership and the One Minute Manager - Increasing Effectiveness Through Situational Leadership
    • by Ken Blanchard,‎ Patricia Zigarmi,‎ Drea Zigarmi
    • https://www.amazon.com/Leadership-Minute-Manager-Updated-Effectiveness/dp/0062309447
  • Principle-Centered Leadership
    • by Stephen R. Covey
    • https://www.amazon.com/Principle-Centered-Leadership-Stephen-R-Covey-ebook/dp/B0068SVE9E
  • The 7 Habits of Highly Effective People
    • by Stephen R. Covey
    • https://www.amazon.com/Habits-Highly-Effective-People-Powerful-ebook/dp/B01069X4H0
  • First Things First
    • by Stephen R. Covey,‎ A. Roger Merrill,‎ Rebecca R. Merrill
    • https://www.amazon.com/First-Things-Stephen-R-Covey/dp/0684802031
  • Leadership Is an Art
    • by Max Depree
    • https://www.amazon.com/Leadership-Art-Max-Depree/dp/B0077EEPTO
  • Leadership Jazz
    • by Max Depree
    • https://www.amazon.com/Leadership-Jazz-Revised-Essential-Elements/dp/038552630X
  • Leading Without Power: Finding Hope in Serving Community
    • by Max Depree
    • https://www.amazon.com/Leading-Without-Power-Community-Paperback/dp/0787967432
  • The Team Coach
    • by Donna Deeprose
    • https://www.amazon.com/Team-Coach-Supervisors-Managers-Environment/dp/081447859X
  • Best Practices in Leadership Development Handbook
    • By David Giber, Samuel M. Lam,‎ Marshall Goldsmith
    • https://www.amazon.com/Linkage-Practices-Leadership-Development-Handbook/dp/0470195673
  • Generation We
    • by Eric H. Greenberg,‎ Karl Weber
    • https://www.amazon.com/Generation-We-Millennial-America-Changing/dp/0982093101
  • Servant Leadership: A Journey into the Nature of Legitimate Power and Greatness
    • by Robert K. Greenleaf
    • https://www.amazon.com/Servant-Leadership-Legitimate-Greatness-Anniversary/dp/0809105543
  • Co-Leaders: The Power of Great Partnerships
    • https://www.amazon.com/Co-Leaders-Power-Partnerships-David-Heenan/dp/0471316350
    • by David A. Heenan,‎ Warren Bennis
  • Management of Organizational Behavior: Leading Human Resources
    • by Paul Hersey,‎ Kenneth H. Blanchard,‎ Dewey E. Johnson
    • https://www.amazon.com/Management-Organizational-Behavior-Leading-Resources/dp/0130175986
  • Millennials Rising: The Next Great Generation
    • by Neil Howe,‎ William Strauss
    • https://www.amazon.com/Millennials-Rising-Next-Great-Generation/dp/0375707190
  • Generations: The History of America's Future
    • by Neil Howe,‎ William Strauss
    • https://www.amazon.com/Generations-History-Americas-Future-1584/dp/0688119123
  • Who Moved My Cheese?
    • Spencer Johnson
    • https://www.amazon.com/Moved-Cheese-Amazing-Deal-Change/dp/B000FQFSTM
  • Leading Change
    • by John P. Kotter
    • https://www.amazon.com/Leading-Change-LEADING-CHANGE-Hardcover/dp/B003YK9OB4
  • The Power Principle: Influence with Honor
    • by Blaine Lee
    • https://www.amazon.com/Power-Principle-INFLUENCE-HONOR/dp/0684810581
  • Leadership Handbook of Leadership Development
    • by Ellen Van Velsor,‎ Cynthia D. McCauley,‎ Marian N. Ruderman
    • https://www.amazon.com/Center-Creative-Leadership-Handbook-Development/dp/0470387394
  • Managers As Facilitators: A Practical Guide to Getting Work Done in a Changing Workplace
    • by Richard G. Weaver,‎ John D. Farrell
    • https://www.amazon.com/Managers-As-Facilitators-Practical-Workplace/dp/157675054X

Tuesday, October 25, 2016

Nintex Forms o365 - Redirect to another page on saving

As Nintex forms on o365 does not have the option to set the URL to the page you want to go to after saving your item, there is a work around for that, in the below code I am changing the source parameter in the url to the new page which is the edit form in my case.


var newSrc = hostWebUrl + '/Lists/MyList/DispForm.aspx?ID=' + listItemId;
var newUrl = document.URL.replace(/(source=).*?(&)/gi,'$1' + newSrc + '$2');
window.history.pushState({path:newUrl},'',newUrl);

I hope it help somebody.

Friday, October 14, 2016

Nintex Workflow o365 – Error assigning a task to SharePoint Group

I have received this error on assigning a task to a SharePoint group:

Activity in progress
Retrying last request. Next attempt scheduled after 10/14/2016 11:25 AM. Details of last request: HTTP Unauthorized to https://blablabla.sharepoint.com/sites/Test/_api/sp.utilities.utility.SendEmail Correlation Id: 1a1a1a1a- abcd-efgh-ijkl-3c3c3c3c3c3c Instance Id: 2b2b2b2b-abcd-efgh-ijkl-4d4d4d4d4d4d
Access denied. You do not have permission to perform this action or access this resource.


Then I discovered that in order to make it working I need to add my account to the group or to change its settings “Who can view the membership of the group?” to “Everyone”.

Another solution I believe is to grant full control permission to the workflow as shown here: https://community.nintex.com/community/build-your-own/nintex-for-office-365/blog/2015/05/14/o365-call-http-web-service-failed-unauthorized-access-denied

Sunday, June 05, 2016

Just passed Nintex Workflow Pro Exam!

I just checked https://learning.nintex.com site, created a free account and passed the pro exam.


And the Admin exam:



Sunday, October 18, 2015

Store the SharePoint filtered values

In case you have a view for your list and users use this view and filter its values and want to keep this filter saved without creating a personal view, you can create a JavaScript file with this content:


 








Then reference this JavaScript file from any page where you have your view. It is simply listen to the “onhashchange” and save the value after the “#” in the localStorage and retrieve it on next page load. The URL of the page after you change the filter looks like this: “/Lists/TestList/AllItems.aspx#InplviewHash6c224f7d-adc4-430c-8501-312cabe57c26=FilterField1%3DLinkTitle-FilterValue1%3DTest%2520Item” and the hash value is everything after the “#”

Saturday, October 17, 2015

Nintex Repeating Section – JSLink

This blog post is building on top other posts by me and my friend Ayman El-Hattab, where in my post (Published April 9, 2015) I talked about creating master details records with repeating section in Nintex forms and Nintex Workflow, and how you can parse the repeating section data and use the information in a workflow “foreach” loop so you can create items in a separate list.

Ayman’s post (Published: Aug 4, 2015) is about displaying the repeating section data in the list view in an easy way, which is mainly by creating a custom field type (Nintex Repeating Section Data). He created two versions 2010 & 2013. But the only problem with this way is that you will need to deploy this field type first as a farm solution, which is not an option in some scenarios like O365 and organizations who do not allow custom server side deployments. Other than that it is a great and easy to use solution.

Why and What is JSLink

So this is why I build this JSLink to make it easy to deploy especially for O365, and if you are coming from Nintex side and don’t know what is JSLink, see this definition:
“Client-side rendering is a new concept in SharePoint 2013. It’s provides you with a mechanism that allows you to use your own output render for a set of controls that are hosted in a SharePoint page (list views, display, add and Edit forms). This mechanism enables you to use well-known technologies, such as HTML and JavaScript, to define the rendering logic of custom and predefined field types.” - Muawiyah Shannak - https://code.msdn.microsoft.com/office/Client-side-rendering-JS-2ed3538a (this link has a very good group of samples). You will also need to check the samples published on the Office 365 Patterns and Practices https://github.com/OfficeDev/PnP/tree/master/Samples/Branding.JSLink where they added some reusable templates.

List Column

Starting by creating a list column of type “Multiple lines of text” in the list where we have our Nintex form. Make it a “plain text” in the “type of text to allow”.


Repeating Section

On the form, drag and drop the repeating section and add the child controls as needed, in my example here I have three text boxes: First Name, Last Name, and Age as you can see below.



I also named the controls in the same order “First Name”, “Last Name”, and “Age”. And yes with the space between “First” and “Name” because this is how I want it to look like in the view.
Then connect the repeating section control to the multiple line field created in the first step.



The Repeating Section JSLink

Now it is the step where the JSLink will do its magic, I have three files deployed to the “Site Assets” library located in the root web in the site collection. (You can choose to upload these files anywhere but remember to change the URLs in the view web part and in the override JavaScript file)

The first file is the “NintexOverrides.js”, and as you can see below I am using the PnP namespaces, and this file mainly is telling SharePoint view that we have another rendering template for one or more fields in the view:


The next file is the “RepeatingSectionTemplate.js”, and I am using the PnP namespace as well. And the purpose of this file simply is to parse the repeating section XML and display HTML table instead:


The third file is “NintexOverrides.css” cascading style sheet to set how we want the table displayed in the view:

 

Deployment

Actually there is no deployment other than copying the three files to the site assets library then set the JS Link property by doing the following steps:

  •  Browse to the view page where you want to apply this rendering (the list where the form with the repeating section is)
  • Edit the web part:




  • Scroll down to “Miscellaneous” then add “~sitecollection/SiteAssets/RepeatingSectionTemplate.js|~sitecollection/SiteAssets/NintexOverrides.js” in the “JS Link” property
  • Click “Okay” then save the page “Stop Editing”

The Output

Now you have the repeating section as follows:


And adding more repeating sections is easy as adding more “Multiple lines of text” column and connect it to the repeating section control on the form, then the output will be something like this:


Then update the “NintexOverrides.js” file to list the new column as follows:


Now the output is like this:



Click here to download the three files mentioned above.

Monday, April 13, 2015

CREATING MASTER-DETAILS RECORDS WITH REPEATING SECTION IN NINTEX FORMS

Forms that have data in a relation of one to many or with master-details can be created using Nintex Forms plus Nintex Workflow. An example of this would be an order form that includes product details such as name, unit price, quantity, taxes and total price as well as  order date, billing and shipping options, and you need to submit both parts together by clicking one submit or save button.

With Nintex Forms, you can build the master part (the order in our example) as you would any other form, using the drag and drop controls, then connect them to the right column on your list, or just keeping them unconnected if you want some of them to be just on the form and not part of the list data. The details part (the products) can be formatted on the form using the Repeating Section control, where you only design how one row should look. Here is a simple example of a repeating section with the product name and the quantity:


As I mentioned above, you can connect your controls to list columns, but for the controls inside the repeating section you cannot connect them to list columns. Instead, you can only connect the repeating section as whole to a multi-line plain text column. The data will be saved as XML in this column like this:

In 2012, Vadim Tabakman posted a very good blog article about Parsing Repeating Section Data where he is reading the repeating section data without creating an extra column for the XML. He parses the XML in a user defined action – UDA - then uses the loop workflow action to query each item inside the repeating section using an incremental index. Vadim’s post includes an example form, workflow and even the UDA. In the comments, his blog followers mentioned that using the loop workflow action is taking too much time to execute. This is true because Nintex has a farm level option named “Safe Looping” which is on by default. Safe looping simply adds delay actions to your workflow at publishing time in certain places like change state and loop. Read more about it in another post written by Vadim on November 2012. Vadim suggested to me through Nintex support that using a "Foreach" action will solve the delay issue, because Nintex does not add the delay inside the Foreach action. Imagine submitting an order with 30 products using the loop action. It would take more than 2 hours to create the order related products in the second list, while it would only take a second using the Foreach action.

Adding to the same concept, I found this post by Erik Abderhalden about Best Practices with Repeating Sections in Nintex Forms, which has some useful information you may need to know. But in his example he is creating a separate column in the main list to hold the repeating section XML while you already have it in a hidden column named DataForm on the list which has the repeating section XML encoded. 

By the way, you can access any un-connected filed on the form from the workflow by querying this hidden column if you don’t want to have a separate column for it. The same, you can have the repeating section not connected to a column and be able to use the Foreach action instead of the Loop action. Here is what that workflow looks like:


As you can see, I am using a UDA to get a collection of XML items to use in the Foreach action, and I am recommending using it as it will keep your main workflow smaller and reduce variables.  Remember, you already need to create a lot of variables to handle the details part. Here is my UDA:


Get the encoded repeating section XML using the Query XML action, then decode it and add it to a collection variable. Instead of the “Log in History List” action, add your logic to create or update the items in the products list.

You can download a sample workflow and the user defined action plus the details of each action from the links below. So I am not going to go into details for each step, as I think the downloadable screens and the other blog posts mentioned earlier have enough information. If not, please feel free to post your question in the comments below.

Conclusion:

Repeating Section in Nintex Forms is a very useful control. Dealing with parsing its data from the workflow is not hard once you know how, and one way to get the information is searching online. And if you post a question on Nintex Connect or send it to Nintex support, they will answer you in a reasonable time frame.