Forum Discussion
Trying to create a user forum on a SharePoint Online site
This is very interesting. I am looking for something like this.
User to submit question.
Wil you be able to share the JSON for the view.
Thank you
bbsin The user submits a question using a form from Microsoft Forms embedded on a page and that form triggers a simple flow in Power Automate:
The suggestion is added to the list and any response is added separately. The view of the list that we display on the page is shown below:
..and the JSON view formatting for that is:
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/view-formatting.schema.json",
"hideSelection": true,
"hideColumnHeader": true,
"rowFormatter": {
"elmType": "div",
"_comment_": "MAIN DIV",
"attributes": {
"class": "ms-bgColor-themeLight"
},
"style": {
"display": "flex",
"flex-wrap": "wrap",
"align-items": "stretch",
"flex-direction": "row",
"padding": "20px",
"margin-bottom": "16px",
"max-width": "400px",
"border-radius": "10px",
"background-color": "#660066"
},
"children": [
{
"elmType": "div",
"style": {
"flex-grow": "1",
"display": "flex",
"flex-direction": "column",
"flex-wrap": "nowrap",
"align-items": "left",
"max-width": "400px",
"min-width": "205px"
},
"children": [
{
"elmType": "div",
"style": {
"display": "block",
"font-size": "15px",
"font-weight": "normal"
},
"children": [
{
"elmType": "span",
"txtContent": "=[$Title]",
"style": {
"display": "=if([$Title] == '', 'none', 'block')",
"color": "white"
}
},
{
"elmType": "span",
"txtContent": "[$SubmittedOn]",
"style": {
"display": "=if([$SubmittedOn] == '', 'none', 'block')",
"color": "white"
}
},
{
"elmType": "span",
"txtContent": "='Suggestion: ' + [$Suggestion]",
"style": {
"display": "=if([$Suggestion] == '', 'none', 'block')",
"padding-top": "20px",
"margin": "0 20px 20px 0",
"color": "white"
}
}
]
}
]
},
{
"elmType": "div",
"_comment_": "DIV TWO",
"style": {
"flex-grow": "1",
"display": "flex",
"flex-direction": "column",
"align-items": "left",
"max-width": "310px",
"min-width": "155px"
},
"children": [
{
"elmType": "div",
"style": {
"display": "block",
"font-size": "15px",
"txtContent": "='Comment: ' + [$Comment]",
"font-weight": "normal",
"color": "white"
},
"children": [
{
"elmType": "span",
"txtContent": "='Comment: ' + [$Comment]",
"style": {
"padding-right": "5px",
"display": "=if([$Comment] == '', 'none', 'block')"
}
}
]
},
{
"elmType": "div",
"style": {
"display": "block",
"font-size": "15px",
"font-weight": "normal"
}
}
]
}
]
}
}
Rob
Los Gallardos
Microsoft Power Automate Community Super User
- AlexandreTomFeb 16, 2024Copper ContributorHello RobElliott.
I was looking for this exact solution, I had suggestions directed only to an email but wanted to make them visible to everyone who views the website.
I was trying to apply your "Create item" solution but I don't know what the "List Name" is refering to and I don't get any suggestions either.
Is is a precreated list on the website? Don't know what I'm missing..
Thank you in advance.
Alexandre - bbsinFeb 15, 2021Iron Contributor
Hi RobElliott
yes this is what I need. will try your solution.
the MS form is on the left hand section. The center suggestion boxes are build with? Do I just include the JSON above for the purple boxes? thanks
Appreciated your kind help and information.
Hope it works on my end. 🙂
- RobElliottFeb 15, 2021Silver Contributor
bbsin the form saves the form response via a flow in Power Automate to a SharePoint list. The centre display of the suggestions is just a view of that list formatted with the JSON I gave in my earlier post.
Rob
Los Gallardos
Microsoft Power Automate Community Super User- bbsinFeb 19, 2021Iron Contributor
thanks.. will try to figure it out.. 🙂
Is there a video to build it step by step ? 🙂