The service “SetSectionProperties” is used to set or update properties of the any section. This could be accomplished by determining the value in a datasource and dynamically setting the field from the section on the webpart canvas, but it can be helpful to this in a process canvas and with the SetSectionProperties service since it gives you access to a process canvas before setting the property. This service can be used where we are required to hide sections, change CSS, change verbiage, etc. A single SetSectionProperties service can set multiple section properties by adding additional sections.
SetSectionProperties Use Examples
Basic SetSectionProperties Use
In this webpage we have a button called “Save”. This button has a process which uses the “SetSectionProperties” service to Disable the section after updating them in database.
Here’s a closer look at the “SetSectionProperties” service inputs. In this example we are using “SetSectionProperties” to disable the section after on clicking the save button.
We can right click on sections tab to add multiple sections to set their properties. Once we add a section, we should pass section’s name into “SectionId” input, the property we would like to set into “PropertyName” input, and the value we would like to set into “PropertyValue” input.
We can use the recommended values at the side to help select a section. This list is populated from the sections on the webpart canvas.
Once clicked into the PropertyName, and after a FieldName has been entered, the properties should populate based on the field chosen.
On the left side we have the section disabled. All the fields in the section are disabled (Grayed out) after the service ran. On the right side we have output logs. In the output we have the Start Time, End Time, and Duration of how long it took the service to run.
Using SetSectionProperties Service to hide/show a section
In this example, users can turn on the edit mode by logging in with their credentials and clicking the “Login To Edit” button. On the page, we have a section with fields for “User Name”, “Password” and a login button. There is another section that has a field named “Message” and a logout button. Initially first section is visible and the second is not. In the button process we are validating the credentials using the “Binary Decision” service. If the credentials correct it logins the user in disables the first section and shows the second section.
Here is what the webpar looks like:
Here’s what the SetSectionProperties service in this process looks like:
This is how it looks on the page once the setFieldProperty runs.