Forum Discussion
lsittler
Jun 01, 2020Brass Contributor
MC211640: Conditionally show or hide columns in a SharePoint list or library form
After several attempts to operate a conditional field on item form, the formula still invalid. The use case is the following one: 1 column Provider, type Choice with 2 values 2 other columns msPr...
- Jun 01, 2020
lsittler As far I have tested this function only works in the display form not in Edit or New Form. Even they don't allow to save the formula as real time evaluation of fields are not happening.
See the below screen shots: 1. New Form:
2. In Display form It works:
3.Finally Display Form formula:
But you can use power-apps that will give you this feature. If I could help to find the solution, please like or mark the answer as solution.
Thanks
Vik
Vikram_Samal
Jun 02, 2020Steel Contributor
Ashis when I was referring that you can’t use it in new form and edit form, I am referring to click event. As hide and show solution does not suffice all the aspects of a solution rather a partial one so that’s the challenge. On the other hand power apps being the better complete solution. Finally when you use the formula while you are in edit form and new form also it do not allow you to save giving me the error where as in display form it allows. Do you experience it differently.
Thanks
Vik
Thanks
Vik
Ashish_Kohale
Jun 02, 2020Iron Contributor
Vikram_Samal : Its working for me on Edit and Display form as per the steps mentioned by me in earlier screenshots.
As per the microsoft standard step mentioned in the link also given by the lsittler ----> https://docs.microsoft.com/en-us/sharepoint/dev/declarative-customization/list-form-conditional-show-hide
Note: Check the second step, it says Open an item to view the item details in the display form.
So in order to imbibe the formula you have to follow as per given standard steps.
To show or hide a column in a list or library form:
Go to the list or library for which you want to show or hide columns in the form.
If you are in a list:
- Open an item to view the item details in the display form.
If you are in a document library:
- Select a file.
- In the Information Pane:
- Locate the Properties section.
- Click Edit all.
At the top of the form, select Edit Form > Edit columns.
In the Edit columns pane, check (to show) or uncheck (to hide) the box for the column or columns as needed.
Note: PowerApps is the best solution to implement this functionality, this way you can show/hide fields on click/change of dropdown values.
- Vikram_SamalJun 02, 2020Steel Contributor
Ashish_Kohale I hope this is the last conversation 🙂 for this.
Are you able to hide and show columns on the basis of selection/update of values in New or Edit Form (intent to do a real time evaluation of parent column and then show and hide of child column ). If your answer is "yes" then that is not happening for me and for me that is a show stopper for me.
Thanks
Vik
- Ashish_KohaleJun 03, 2020Iron Contributor
Vikram_Samal : Yes I understood yours query totally. All I wanted to say the formula is working but not on real time value changes(which I have explained pretty in my earlier post with screenshots), it takes effect only after saving the value.
The real time evaluation needs to have page load event or ready() function like as in JavaScript/JQuery. I think the conditional formula intended to work only after value gets saved in database.
Once you apply formula on specific column to which you want to show/hide based on value of another column. And then create New item,select column value based on show and hide of another column and then save the item and open the same item again, the formula working on both display/edit form.
In order to work this in real time we need to customize the form with PowerApps, where we can get more controls to apply such condition.
Its really awesome such tech community where we get to know various people and discuss with them. It gives us opportunity to Share and Learn.
Thank You.