That rule should wipe it clean. Depends if it's running or not.
It's difficult with a CC part because if you've made the part before you'll have a file already on your computer. iLogic isn't really meant to be used on CC parts.
To test that it's working. Start a new part, just a cube. Put that ilogic code in your rule.
Type something in the iproperty part number and save it. Run the rule by right clicking on it. Check your iProperties and it should be blank now.
What you need to do, is create a custom version of the CC part, add the rule, then apply that template to the CC part to do it properly.
https://knowledge.autodesk.com/support/inventor/learn-explore/caas/CloudHelp/cloudhelp/2020/ENU/Inve...
Then refresh the library parts.
It'd be much easier to just get it working from the family table, but I think you'd have to have a double space the way I told you above as it will reject a blank part number. Even if you did get it to do blank part numbers, I think when CC saves the part it would automatically put the file name as the part number anyway if it's blank. By having it as a double space it won't automatically populate it.

Inventor Certified Professional