Ok, it sounds like I need to be more direct.
Question1
More specifically here is the xpath that works in setting the value from another control, which is a drop down with EMPNO:
xdXDocument:GetDOM("Rates")/dfs:myFields/dfs:dataFields/d:sysemprate/@HOURLY_RATE[../@EMPNO = xdXDocument:get-DOM()/my:myFields/my:DirectLabor/my:DirectLaborGroup/my:Employee[. = current()]] * ../../../my:Multiplier
and here is the xpath that doesn't work to set the default:
xdXDocument:GetDOM("Rates")/dfs:myFields/dfs:dataFields/d:sysemprate/@HOURLY_RATE[../@EMPNO = xdXDocument:get-DOM()/my:myFields/my:DirectLabor/my:DirectLaborGroup/my:Employee] * ../../../my:Multiplier
If I try using the same code in the default as the value that I set it with, I always get NaN, but with the above xpath, all the values match the last chosen EMPNO drop down box, not the one in the row they are in. I have tried: my:DirectLaborGroup/my:Employee[current()] and my:DirectLaborGroup[current()]/my:Employee and they do not work.
Can someone please tell me where to put current() or if there is some other function or trick that I need to use so that when I change the multiplier field, it updates all the rows in this repeating table under DirectLaborGroup.
Question 2
I know how to get the URL, I already do that, but I cannot find anywhere how I connect to a sharepoint list using jscript where I can give the URL as a parameter. Can someone PLEASE point me to an example or documentation on how to do this. Right now I connect to a static secondary connection, which works fine for a single form, but when I need to make this work for hundreds, redoing the data connection and republishing every time, it is not practical.