locked
remove 11;# from 11;#kamil RRS feed

  • Question

  • i know this sounds silly but bare with me. how can i remove '11;#' from '11;#kamil'? is there a way for me to read only the value after '#' which is 'kamil'. im not planning using remove(0, 4) as the number might change from single to double or maybe triple digit. please help
    Friday, November 9, 2012 3:27 AM

Answers

  • You can use the substring-after function to capture anything after "#" appears. So, it would look something like this

    substring-after("11;#kamil", "#")


    Pman
    http://www.pmansLab.com/

    • Marked as answer by MRu_ Monday, November 19, 2012 2:06 AM
    Friday, November 9, 2012 3:38 AM

All replies

  • You can use the substring-after function to capture anything after "#" appears. So, it would look something like this

    substring-after("11;#kamil", "#")


    Pman
    http://www.pmansLab.com/

    • Marked as answer by MRu_ Monday, November 19, 2012 2:06 AM
    Friday, November 9, 2012 3:38 AM
  • thanks for the reply but that didnt work out but right now im using this

    //it will gives value in 'assigned to' field

    string user = workflowProperties.Item["AssignedTo"].ToString().Remove (0, 4);

    //assign new task to user

    createTask1_TaskProperties1.AssignedTo = @"SPS2010\" + user;

    i want string user value equals to 'kamil' for me to assign new task to it. that means it is dynamic. not necessarily it is kamil. any suggestion?

    Friday, November 9, 2012 3:47 AM