[SOLVED WITH WORKAROUND] How get value of first item from table? [message #1710717] |
Thu, 08 October 2015 15:33 |
|
Connected with old discussion.
Since is marked as SOLVED I open a new one.
https://www.eclipse.org/forums/index.php/t/826519/
HI Folks,
I have the same problem I need to select the first table element.
I try to use your snippet, it works because first table element is selected but return an error and break the execution.
with [get-view TaskList | get-section "" | get-table] {
select ".*" | get-property "getParent().getChildren().Control[0].getChildren().Control[3].getItems().TableItem[1].getDescription()" -raw | let [val msg -input]
{
//Select-item $msg
global [val n [plus 1 $n]] -override
if [$n | equals 1 ]
{
Show-alert $msg
}
}
}
if I run the same code with a foreach and I can visit the table but I need to select only the first item.
I cannot use the "Record & Play" because it selected a dynamic filed value
"Ce sont les petits désirs qui rendent un jeune homme hardi."
Giovanni Giacomo Casanova
[Updated on: Mon, 12 October 2015 10:42] Report message to a moderator
|
|
|
Re: [NOT SOLVED] How get value of first item from table? [message #1710726 is a reply to message #1710717] |
Thu, 08 October 2015 16:47 |
|
Hi Folks,
I found a workaround since I have a unique data I use it to select the line using a regular expression anyway if you have additional information to handle table feel free to share.
get-items | foreach [val item] {
if [$item | get-property "values['Description']" -raw | matches ".*3314.*"] {
$item | Select-item
}
"Ce sont les petits désirs qui rendent un jeune homme hardi."
Giovanni Giacomo Casanova
|
|
|
Powered by
FUDForum. Page generated in 0.02676 seconds