Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago

Lookupvalue in same table based on two columns

Hi everyone,

 

I have one table that contains two columns:  a non-unique url and unique activity id's. These two columns are in one table and i would i like to achive a new column that return the on each row the url with each unique activity ID.

 

So This is the example: In the yellow part of the URL column you see "&[activityid]&" and in the activityid column you see each row a unique id's. A new column will return on first row the following output:

 

This is the example:

A new column need to be created where the yellow marked non-unique value will replayce with {activityid} on each row.

So the first output on this example would be:

 

https://rubiconict.crm4.dynamics.com/main.aspx?etn=appointment&id={018a01c8-cf2d-e811-8145-e0071b65cea1}&newWindow=true&pagetype=entityrecord

 

 

Any suggestions?

 

Many thanks! 

 

7 Replies

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hello,

       

      What do you exactly mean?

      • Greg_Deckler's avatar
        Greg_Deckler
        Community Champion

        So This is the example: In the yellow part of the URL column you see "&[activityid]&" and in the activityid column you see each row a unique id's. A new column will return on first row the following output:

         

        Is there supposed to be something here?

         

        This is the example: A new column need to be created where the yellow marked non-unique value will replayce with {activityid} on each row. So the first output on this example would be:

         

        Is there supposed to be something here?

         

  • Greg_Deckler's avatar
    Greg_Deckler
    Community Champion

    Maybe the SUBSTITUTE function?

     

    SUBSTITUTE(<text>, <old_text>, <new_text>, <instance_num>)

     

    New Column = SUBSTITUTE([URL],"""&[activityid]&""","{" & [activityid] & "}")