Hyperlink Property UNC Path with white space %20

Hi Guys

I'm calculating a UNC path Value into a Hyperlink Text property, whichs looks something like this:

Only variable hereby is the last 5 digits, the rest of the path is static. Sadly, the whitespace / blank is translated to "%20" which then leads to an error opening the link with explorer. Without this, by coping the whole thing directly into explorer path, it works smoothly.

I already tried a couple of workarounds from the web like putting the path in "" / <> or brackets []. None of it had an effect.

Neither did putting file:// in front of the whole thing or trying the old windows path length restriction version (~1).

Has anyone an idea, how to get rid of this nuisance? I think it stems from the fact, that M-Files convert the sentence into a weblink, instead of an explorer path.

Many thanks for your help and kind regards,

Thomas

Parents
  • Note sure if this helps you or not, but we do something similar that involves the white spaces and then adds a variable or changed part at the end. The static part is formatted this way for us: szPath = "file:///M:\Closed Matters\- Master View -\" . This references a view, but the the triple slash? Maybe? We have a small script to calculate the final value.

  • This is not bad idea.

    Set oPropVals = CreateObject("MFilesApi.PropertyValues")
    Set oPropVals = Vault.ObjectPropertyOperations.GetProperties(ObjVer)
    
    iPDFileName = Vault.PropertyDefOperations.GetPropertyDefIDByAlias("PD.FileName")
    
    szPDFileName = oPropVals.SearchForProperty(iPDFileName).TypedValue.DisplayValue
    
    szPDFileName = Replace(szPDFileName,"""","")
    szPDFileName = "file:///" & szPDFileName
    
    OUTPUT = szPDFileName

Reply
  • This is not bad idea.

    Set oPropVals = CreateObject("MFilesApi.PropertyValues")
    Set oPropVals = Vault.ObjectPropertyOperations.GetProperties(ObjVer)
    
    iPDFileName = Vault.PropertyDefOperations.GetPropertyDefIDByAlias("PD.FileName")
    
    szPDFileName = oPropVals.SearchForProperty(iPDFileName).TypedValue.DisplayValue
    
    szPDFileName = Replace(szPDFileName,"""","")
    szPDFileName = "file:///" & szPDFileName
    
    OUTPUT = szPDFileName

Children
No Data