SharePoint / sp-dev-docs

SharePoint & Viva Connections Developer Documentation
https://docs.microsoft.com/en-us/sharepoint/dev/
Creative Commons Attribution 4.0 International
1.24k stars 1k forks source link

Show or hide columns in a list or library form based on internal columns (eg PromotedState) #9550

Open paxvas opened 6 months ago

paxvas commented 6 months ago

What type of issue is this?

Question

What SharePoint development model, framework, SDK or API is this about?

Declarative list formatting

Target SharePoint environment

SharePoint Online

What browser(s) / client(s) have you tested

Additional environment details

Issue description

I want to show or hide fields in a page library based on the the page type (Sitepage or news). Therefore I tried many conditional formulas targeting the internal field PromotedState (type number should be supported) to hide news specific fields from normal sitepages. with following sample formulas:

=if([$PromotedState]>1,'true','false') =if([$PromotedState] >= 1, 'true', 'false') =if([$PromotedState] == '1'||[$PromotedState] == '2', 'true', 'false')

But none of them seemed to work. Are hidden/system fields not allowed in this context. If NO why? And can this be changed as this would be a feature for news/content pages without the need to have multiple content types and i can use the standard menues then.

Please be kind to explain me how it works. THX in advance Janko

ghost commented 6 months ago

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.