July 5, 201213 yr Just realized I posted this to the wrong forum. Please disregard here... and I'll repost under scripting. Thanks... mp I have two linked tables (one is my context... the other a portal placed on the context table). I simply want to be able to click a button to create a new portal row. I have looked everywhere for the problem… spelling, relationships, etc…. The script creates the new record but never sets the field with the __ID_PEO_pk ... I'm hoping it's glaringly obvious to someone out there what I might be doing wrong because I'm at my wits end... Tables: PTO_PEOPLE (context layout) __ID_PEO_pk Name PTO_STATUS_lineItems_j (portal) __StatusID_pk __ID_PEO_fk type I’ve linked The tables by primary key __ID_PEO_pk from the PTO_PEOPLE table to __StatusID_pk, the foreign key in the PTO_STATUS_LineItems_j Here's my Script: Set Variable [$PEO; Value:PTO_PEOPLE::__ID_PEO_pk] Go to Layout [PTO_STATUS_LineItems_j”(PTO_STATUS_LineItems_j)] New Record/Request Set Field [PTO_STATUS_LineItems_j:__ID_PEO_fk; $PEO] Commit Records/Requests [skip data entry validation; No dialog] Set Variable [$statusID; Value:PTO_STATUS_LineItems_j::__StatusID_pk] Go to Layout [original layout] Go to Portal Row [select; First] Go to Field [status_LineItems_j::date]
July 5, 201213 yr Author I have two linked tables (one is my context... the other a portal placed on the context table). I simply want to be able to click a button to create a new portal row. I have looked everywhere for the problem… spelling, relationships, etc…. The script creates the new record but never sets the field with the __ID_PEO_pk ... I'm hoping it's glaringly obvious to someone out there what I might be doing wrong because I'm at my wits end... Tables: PTO_PEOPLE (context layout) __ID_PEO_pk Name PTO_STATUS_lineItems_j (portal) __StatusID_pk __ID_PEO_fk type I’ve linked The tables by primary key __ID_PEO_pk from the PTO_PEOPLE table to __StatusID_pk, the foreign key in the PTO_STATUS_LineItems_j Here's my Script: Set Variable [$PEO; Value:PTO_PEOPLE::__ID_PEO_pk] Go to Layout [PTO_STATUS_LineItems_j”(PTO_STATUS_LineItems_j)] New Record/Request Set Field [PTO_STATUS_LineItems_j:__ID_PEO_fk; $PEO] Commit Records/Requests [skip data entry validation; No dialog] Set Variable [$statusID; Value:PTO_STATUS_LineItems_j::__StatusID_pk] Go to Layout [original layout] Go to Portal Row [select; First] Go to Field [status_LineItems_j::date]
July 5, 201213 yr Here's my Script: Set Variable [$PEO; Value:PTO_PEOPLE::__ID_PEO_pk] Go to Layout [PTO_STATUS_LineItems_j”(PTO_STATUS_LineItems_j)] New Record/Request Set Field [PTO_STATUS_LineItems_j:__ID_PEO_fk; $PEO] Commit Records/Requests [skip data entry validation; No dialog] Set Variable [$statusID; Value:PTO_STATUS_LineItems_j::__StatusID_pk] Go to Layout [original layout] Go to Portal Row [select; First] Go to Field [status_LineItems_j::date] That can't be an exact copy of your script. can it?
July 5, 201213 yr Just realized I posted this to the wrong forum. Please disregard here... and I'll repost under scripting. Thanks... mp Please don't do that (double-post) - let the moderators move the thread, if necessary.
July 6, 201213 yr Author Try this Thank you Kris.... that really simplified things for me--I appreciate. I have merged your two topics. Thank you Lee (I'll remember that next time).... :hmm:
July 6, 201213 yr Just a suggestion you might want to rethink your Table/TO/Field naming conventions as its not a best practice to start a fieldname with underscore anymore. Looks nice in sort order but i think it causes other problems with 12. It's 6 am here and i don't remember why but remember hearing about it.
July 6, 201213 yr http://www.filemakerhacks.com/?p=4924 underscores aren't ExecuteSQL friendly if first character, apparently. Wrap in quotes.
Create an account or sign in to comment