Check if repo item does not exist then do work
Posted: Mon Dec 07, 2015 4:42 pm
Hi all,
I have a situation where I added an object(objectA) to my repo, it is text which sometimes exists inside a table(datagrid). When the text is not there, i want to insert it, otherwise move on.
I have written the following if statement:
if(!repo.App.Form.objectA.Exsists())
{
//do work to insert
}
When the text is in the table, my solution works and the code '//do work to insert' is skipped as expected.
However, when the text is not in the table, my solution gets stuck at this point and just hangs.
The same problem occurs when i use .Visible
Any ideas?
Thanks in Advance!!
I have a situation where I added an object(objectA) to my repo, it is text which sometimes exists inside a table(datagrid). When the text is not there, i want to insert it, otherwise move on.
I have written the following if statement:
if(!repo.App.Form.objectA.Exsists())
{
//do work to insert
}
When the text is in the table, my solution works and the code '//do work to insert' is skipped as expected.
However, when the text is not in the table, my solution gets stuck at this point and just hangs.
The same problem occurs when i use .Visible
Any ideas?
Thanks in Advance!!