Defined Value on DB Insert not Working

This is the first time I have done this, so perhaps I am doing something wrong… but I can not get a defined value to be used on Insert as I would like.
Here is what I have setup:

And here is the SQL it is using… which is incorrect… SalesOrderOutKey is using the value of 23 when I wanted it to use the defined value of 375.

Why isn’t this working how I think it should?

I actually want to use a variable as the defined value, but when it wasn’t working I opted to try a hardcoded value as shown and it is still not working.

I will add that I am trying to add new detail records to a master/detail form. Perhaps that makes a difference.

Please help or let me know if this is a real bug.
Thanks!

Screen Shot 2014-12-18 at 10.55.23 AM.jpg

Screen Shot 2014-12-18 at 10.55.56 AM.jpg

This gets worse… I have now tried just letting me put in my own value for the field and it seems to ignore what I put it.
Why is this happening?

Entering value:

Wrong SQL running:

Screen Shot 2014-12-18 at 1.30.00 PM.jpg

Screen Shot 2014-12-18 at 1.30.23 PM.jpg

Hello,

Is the ID from the master application item 23?

regards,
Bernhard

The SQL is used (open the app) before the defined value (at Form Settings / Edit Fields) is read … That’s all.

Try and change the value at Form Settings / Fields / <your field> / Initial Value. This value is read at startup.

Yes the ID from the master application is 23… I think I see where you are going… is there a way to get this to work? The reason I have to change the ID on insert is due to a trigger which I can’t modify… the MySQL trigger is expecting the sales order number and then it looks up the key… which in the sample above is actually 23… I thought I could just insert the 23… but the trigger makes it fail because it fires on insert.
Thanks for everyones help. I suppose this is not a bug… but an issue with the order things happen… Im just wondering if there is a way to make this work.

I tried that… it still didn’t use that value… but it wouldn’t really help me anyway since I only need the value to change to what I define on insert. On update it needs to stay what it is… this is all due to the Trigger on the table thats defined in MySQL… which I can’t modify… I am integrating my application into an existing structure.
I suppose I could completely remove the triggers on my own table and pull the data out of the triggered table… then I wouldn’t be having all these issues.
I just didn’t want to duplicate data unnecessarily.
Thank you all for your help!