Get a specific gridItem and its value
So far i have tried this
var x = pageForm.viewModel.HasRelatedWorkItems[i].DisplayName.toLowerCase(); //gets the item in the grid
var y = $("#HasRelatedWorkItems div div table tbody tr td")[i].innerHTML //gets the value
But how can i loop trough the items in the grid and match/get the one specific that i need to pu in the url
http://sethnn313:81/quicksearch.aspx?q=" + y //insert the variable into the URL
Another approach would be ig you can make the CI item in the grid clickable and get to say the HW asset page of that CI
but my know how of jquery is somewhat limited.
Thx
Best Answer
-
Roland_Kind Partner Advanced IT Monkey ✭✭✭
Hi,
for example the pageForm.viewModel.RelatesToConfigItem is an array - so just loop through the Array
pageForm.viewModel.RelatesToConfigItem[0] or pageForm.viewModel.RelatesToConfigItem [1] should give you the values for the first and second item
7
Answers
Hi,
I am not 100% sure, but I believe, that the viewmodel contains all important values for related items (CI, WI)- what info (value) do you need for your URL ?
regards
Hi,
for example the pageForm.viewModel.RelatesToConfigItem is an array - so just loop through the Array
pageForm.viewModel.RelatesToConfigItem[0] or pageForm.viewModel.RelatesToConfigItem [1] should give you the values for the first and second item