- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-04-2022 06:04 AM
Hi Experts,
We have a catalog item with one of the variable value, when user input particular value (i.e, https://dev.company.com/Enterprise-company-Org/PRJ-project/_build?definitionId=4841), as user inputs and changes to other field we need to populate with above value with additional changes(like https://dev.company.com/Enterprise-company-Org/PRJ-project/_apis/pipelines/4841/runs?api-version=6.0-preview.1).
"_build?definitionId=" should be replaced with "_apis/pipelines/" at the end append with "/runs?api-version=6.0-preview.1"
May i request experts inputs for this requirement.
Thanks, Jay
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-04-2022 06:18 AM
Hi Jay,
You can use below logic in client script
var str = g_form.getValue('field_name');//replace field name with text where user enters
var res = str.replace(/_build\?definitionId/g, "_apis/pipelines/");
var finalres=res +'/runs?api-version=6.0-preview.1';
//finalres can then be used to set value

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-04-2022 06:18 AM
Hi Jay,
You can use below logic in client script
var str = g_form.getValue('field_name');//replace field name with text where user enters
var res = str.replace(/_build\?definitionId/g, "_apis/pipelines/");
var finalres=res +'/runs?api-version=6.0-preview.1';
//finalres can then be used to set value