Forum Discussion

PWA_Service's avatar
PWA_Service
Copper Contributor
Jun 19, 2024

New Project - Regex on Project Name - Limit Special Characters

Greetings,

 

I haven't been able to find any reference to this anywhere online...

 

When creating a new Project in PoL/PWA, is there a way to apply RegEx to the 'Name' (Project Name) field?

 

Basically: I would like to limit it to Alpha-Numeric, Spaces and Dashes...and definitely prevent '&' and brackets '()[]'. Either make it required or prevent 'finish' button (Create project) from functioning until it is valid.

 

What might be a strategy to go about this validation?

 

 

 

(Note: I am somewhat surprised this has never been discussed before...especially considering that PWA creates a sub-site & use the 'Name' field as the URL. Frankly, it is surprising that PWA even allows '&'.)

 

Much appreciated,

-TR

  • Hello PWA_Service ,

    This is not possible out of the box as you have seen, you'd need to write the code to do this and insert it on all PDPs where Name is present. This could be done using a script editor web part like below:

     

    Or built as a proper solution using SPFx etc. 
    You'd then need to consider how you handle the project name when the project is being created or edited from Microsoft Project Desktop, VBA might be able to help you there.

    Paul

  • Hello PWA_Service ,

    This is not possible out of the box as you have seen, you'd need to write the code to do this and insert it on all PDPs where Name is present. This could be done using a script editor web part like below:

     

    Or built as a proper solution using SPFx etc. 
    You'd then need to consider how you handle the project name when the project is being created or edited from Microsoft Project Desktop, VBA might be able to help you there.

    Paul

    • RodFromm's avatar
      RodFromm
      Steel Contributor

      Paul_Mather Thanks for sharing.  I am also wanting to do something similar, but when try to edit the PDP I do not see the Content Editor, Script Editor or Silverlight Web Part options.  Several months ago they were available, and my access/permissions have not changed.  Any ideas on what's causing the issue before I open a ticket with Microsoft?

       

Resources