Loading...

qlist custom calculated field – parse URL

qlist custom calculated field – parse URL

Home Forums QuickApps Forum qlist custom calculated field – parse URL

  • This topic is empty.
Viewing 3 reply threads
  • Author
    Posts
    • #7074
      Anonymous
      Anonymous
      Participant

      Hi there,

      n

       

      n

      You can try to use the ‘Calculated Value’ setting in Custom Field, something like this:

      n

      <a href= https://servername/sites/subsite1/subsite2/subsite3/<%Name%>>/subsite2</a>

      n

       

      n

    • #4649
      Anonymous
      Anonymous
      Participant

      I am using a qlist web part custom field to parse a section of a url. 

      n

      for example

      n

      We need to get the current item url, and display any one of the segments of the url for example:

      n

      If the URL = https://servername/sites/subsite1/subsite2/subsite3/doument.doc

      n

      How do we display the value of a portion/particular segment of this url?

      n

      For example, I want to display /subsite2 in a custom column using the qlist web part.

      n

      Could someone please provide me a code snippet that can be used in the calculated element in the custom field? Is there any alternative ways of performing this, if so could you elaborate?

      n

      n

      n

       

    • #7076
      Anonymous
      Anonymous
      Participant

      Hi,

      n

      I think you should have a rule about which custom column has which segments. You can write some JavaScript into Calculated Value setting to implement the rule logical. For example, the ‘<%Type%>’ filed contains the current item’s URL information, and you can use this field for you script logical.

      n

    • #7075
      Anonymous
      Anonymous
      Participant

      Hi ,

      n

      Thanks for the quick reply, unfortunately this is not what we are trying to do.  We need to enumerate the current item URL automatically and have it parsed into segments that we can display each segment in its own custom fields when viewing the list in the qlist web part.

      n

      For example:

      n

      Custom column1 – https://&nbsp;

      n

      Custom column2 – server.domain.com 

      n

      Custom column3 – site collection

      n

      Custom column4 – sub site1

      n

      Custom column5 – document or item name

      n

      etc…

      n

Viewing 3 reply threads

You must be logged in to reply to this topic.