Jump to content
Salesforce and other SMB Solutions are coming soon. ×

Possible in a Script?


Recommended Posts



Brief/Short Version: When creating a new Record for Table A, can you go to a related record from Table A via a script?


There is also Table B, which might have several records in A linked to a single record in B (via a letter, in a portal). The field I want to go to a related record from, contains a letter (A, B, C, etc) that specifies which record within that record of Table B coresponds to it.



I am in Table B. I open a Layout which makes a new record within Table A but keeps it linked to that record in B. There is also a field which has a pop-up containing all records that exist in Table A for that record in Table B. Is it possible, within a script, to jump to the cooresponding Table A record and modify a field?



Longer/Detailed Version:

I am working with a Solution for a Photography Studio. All clients who have a photo session at the studio, also have a Review at a future date to go over the pictures taken.


Each session is its own entity/record (be it Review or otherwise), and are viewed in a portal in the clients account area.


On the 'Main' Page of the solution we also have a portal showing all 'Real' (non-review) sessions to track their status in-house. Pictures taken, edited, etc. The 'Due Date' is at whatever point the client schedules their review date for. (After their review we 'hide' the record so that it no longer appears in the portal)


Now here is the problem! When we make a new appointment for the clients review, I want for that date to be plugged into the record of the session it is for..




John Doe has just had his 3rd session with us. Within his account you can see his past experiences with us:


Sesion Type / Date

A / 12-17-03

REV / 1-04-04

B / 3-10-04

REV / 4-1-04

C / 5-5-05

REV / 6-17-05



Now, within the record for C there is a field for the 'REV' Date. This is the date we want to track on the home page for session status (and sort by it).


We want this to happen via a script, when the appointment for the review is set up. We want to try to stay away from making this a manual entry thing if we can help it.


The script already exists (assigns it a letter if it is a session, puts it into the calendar, etc), I am just hoping to modify it somehow to add this Review date to the coresponding Session (although the session and the review are currently NOT linked in any manor (except for being linked to a particular client within the Account Table), simply different 'types' of appointment).


One thing I tried was to have a pop-up of all their session letters (via a Value List). And then try to go to the related record for the one selected (then adding the Review Date which is stored in a global). But I cant seem to go to the related record (just stays in the current/new record that it is creating for the Review). Have tried using the 'Select field' option, etc... I think if I can go to the related record somehow I can make this work???



Any help or other ideas? Sorry if I am not descriptive enough :{ Let me know if there are any further details needed... Developed on a PC using Developer 7 and XP - Solution runs on normal FMP 7 on a few Macs.


Link to comment
Share on other sites

I found a solution that works smile.gif Still open to ideas if there is a better method out there...



Currently added the following to the script:


If [ Sessions::Type = "Review" ]


Set Field [ Sessions::ReviewDate_G; Sessions::Date ]


Set Field [ Company::ReviewSession_G; Sessions::ReviewSessions ]


Go to Layout [ "Sessions" (Sessions) ]


Enter Find Mode [ ]


Set Field [ Sessions::CompanyID; Company::ID_G ]


Set Field [ Sessions::Session; Company::ReviewSession_G ]


Perform Find [ ]


Enter Browse Mode


Set Field [ Sessions::MRevDate; Sessions::ReviewDate_G ]


End If

Link to comment
Share on other sites

Try putting a button in the first portal row, attached to a script step of


Go to Related Record [show only related; "Sessions"; Using layout: Sessions]


where "Sessions" is your relationship from the parent table to the Sessions TO.

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...

Important Information

Terms of Use