Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

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

Recommended Posts

Posted

I have a script attached to a button that repeatedly uses the Insert from Last Visited function to add data from 15 or so fields (that can be common) to the record of a new client if that client is participating in the same activity as the previous client.

This works fine... but some fields refuse to transfer to the new record.

This no doubt has something to do with the complexity of my database structure - but WHY baffles me, especially when some data transferrs correctly and other data just does not.

I have a tab structure.

The Primary tab contains two sub-tabs (Subtab_1 and Subtab_2).

Subtab_2 also contains a portal.

The Primary tab is a "clinic" type and contains the Activity_ID field.

Subtab_1 contains "Patient Details" (referrer, clinician, diagnoses, progress notes, etc)

Subtab_2 contains "Location and Session Details" (Location, Consultation Type, Consultaion Method, etc) PLUS a portal recording the session details (Session_ID, Date, Duration, No_recipients, No_Providers, Clinician names (x4), etc)

The fields I want to transfer are (I will list only the ones that you need to see the structure):)

Activity_ID (contained in the Primary tab)

Date Opened (Subtab_1)

Date_Closed (Subtab_1)

Location (Subtab_2)

Session_Date (Subtab_2, portal)

No_Recipients (Subtab_2, portal)

The script begins by directing the focus (GoToObject) to the Primary tab and tranferring the Activity ID (works fine)

Then the script directs the focus to Subtab_1 and transfers the date fields - plus relevant others. (all work fine EXCEPT Date_Opened...)

The script then directs the focus to Subtab_2 and tranfers Location etc. (Works fine)

THEN we come to the portal.

Again the date is a problem. It inserts the date in the first row, then all the other details in the second portal row! (all info correctly transferred except for that anomalie).

Now I suspect the behaviour into the portal confuses itself because on Subtab_1 I have a calculation field which directly reads from the portal the "Date of first contact" (which is the first portal row date).

FM seems to go to that field on Subtab_1 (even after its directed focus is in Subtab_2) in preference to the portal field when tranferring (or reading the data to be transferred) and I cannot get it to "only" focus on the portal for this information...

(I also have a "Date of last contact" field on Subtab_1 which is ANOTHER portal (displayed as a single field), sorting opposite to the main portal on Subtab_2 so it can pick up and display the last date entered... but that is not part of the transferred info)

(Whew! With me so far...?)

My first problem is however with the Date_Opened field. It is a standalone field and should transfer successfully (just like Date_Closed does), but it does not...

Even when I reorder the script steps so Date_Closed precedes Date_Opened, it still adds Closed but leaves out Opened...

(I know Date_Closed sounds an illogical transfer in the context of what the data is, but really it is just a functionality check at this stage)

I have even tried adding Set field instructions and even copy and paste instructions... to no avail. It just REFUSES to tranfer the Date_Opened field's information.

I have even deleted and reconstructed that field... nothing...

Now the portal...

Everything works fine (ie; information transfer is complete) BUT it is in two portal rows instead of one.

The date in the first row and all the other info in the second row.

The portal has a Session_ID field which is an autoenter portal row number and so the date field is assigned portal row number "0" (zero)!

While the main info is correctly assigend a "1" (but is actually now the second row of the portal...)

Can anyone help or explain what is going on here?

(Sorry, I know it is perhaps complex, but that's the nature of the beast :)

Thanks.

This topic is 5591 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.