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

checkbox fields to new records


Recommended Posts

using FM8.0 on Windows

Entering therapy services for residents of a Nursing Home. Curently entering each service for each resident as a new record. However entry was tedious as I need to searcha list of 170 residents for each service- even though I use "previous record" for service and date entry. I now have a new layout where I can display all 170 residents in a checkbox field and enter new records by clicking new record the the appropriate checkbox ( changing service and date as and when needed).That's an improvement but annoying as the screen flashes and chunks with each entry.

Does anyone have a simple script which would take the list of residents from the checkbox and create a new record for each resident "checked" using a common service and date . That is, if 20 residents attend Bingo on 1/8/2006 I want to be able to enter "bingo", "1/8/2006", and check off the 20 names, run the script and have 20 new records entered into the services DB. Any assistancegreatlyappreciated.

Link to comment
Share on other sites

Hi AAA ( Triple "A")

I've had a go and almost have it -I think !

Note that the user has clicked new record and (say) 10 resident ID's( checkboxs) before running script hense the resident ID field has 10 values- which is revealed with the value(count) function.

Ive set 3 variables $x=1( counter), $y=value count( ie 10) and $z = the residentID field( which I hoped had 10 values!)

Then I run a loop


Link to comment
Share on other sites

Sorry accidently submitted reply-


new record/request

Setfield(therapy::ResID; Getvalue($z,$x)

Exit loop if [$x=$y]

set variable [$x; value:$x+1]

end Loop


This almost works but dosn't seem to recognise the $x position of the $z list. Is this because $z only has one value and not all ten previously identified ?


I have a flag script to delete the original record after the 10 new records are created - but unfortunately the 10 new records (which get created) don't have the res ID . Your further input would be terrific

Link to comment
Share on other sites

Hi Again AAA


Got it to work by replacing the $x variable with a counter field in the table and increasing that - per the FM loop help example.


Only problem is that the screen tends to redraw(?) the checkbox field which is large ( ie 170 checkboxs ) and this delays (minutely) the entry of each selection and looks a little chunky. Is it possible to stop this ?

Link to comment
Share on other sites

This thread is quite old. Please start a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...

Important Information

Terms of Use