Hi DKinsley,
I think the following steps and code will solve your problem.
1) In order to know the last instance, you need to find the count of instances available. This can be achieved through the following code"
var totalRowInstances = xfa.resolveNode("form.Name.txtName").instanceManager.count;
2) To access the last index value,
var lastIndex = totalRowInstances-1;
//[Since the index always starts with 0]
var lastIndexNameCheck = xfa.resolveNode("form.Name["+lastIndex+"]").txtName.rawValue;
if(lastIndexNameCheck != null)
{
//do something
}
else
{
//do something
}
Please Note : Here, form - refers to root node, Name - refers to subform, txtName - refers to name of the text field.
Please let me know if this helped.
Thanks,
VJ