Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 4523 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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... :idot:

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]

Posted

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... :idot:

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]

Posted

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?

Posted

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.

Posted

Try this

Thank you Kris.... that really simplified things for me--I appreciate.

I have merged your two topics. :hair:

Thank you Lee (I'll remember that next time).... :hmm:
Posted

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.

This topic is 4523 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.