Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

copy and paste oddity...

Featured Replies

I have a script that basically creates a new related record in a table, but before it does that it checks to see if there is not already a "new" record (really incomplete data entry) ... all this works fine however one I go to the layout and create a new record the primary key identifier data is reset to empty and the paste just pastes anything I have in my clipboard...

This all worked fine until yesterday... and I can't see why but it goes bad at line 11

1 Set Field [ Participants::Participant_RecordID ]

2 If [ Determinations Incomplete::Determination_Status_FK = "0" ]

3 Show Custom Dialog [ Title: "Invalid Choice"; Message: "An unfinshed determination already exists."; Buttons: “OK” ]

4 Go to Related Record [ From table: “Determinations Incomplete”; Using layout: “Add Determination” (Determinations) ]

5 Exit Script [ ]

6 Else

7 Copy [ Participants::Participant_RecordID ] [ Select ]

8 Show Custom Dialog [ Title: "Determination Type"; Message: "Select the determination type"; Buttons: “Cancel”, “Full”, “Declined” ]

9 If [ Get ( LastMessageChoice ) = 2 ]

10 Go to Layout [ “Add Determination” (Determinations) ]

11 New Record/Request

12 Paste [ Determinations::Client ID ] [ Select; No style ]

13 Go to Next Field

Enter Browse Mode

Else If [ Get ( LastMessageChoice )= 3 ]

Go to Layout [ “Determination_Decline_no_Show” (Determinations) ]

New Record/Request

Paste [ Determinations::Client ID ] [ Select; No style ]

Insert Text [ Determinations::Determination_Status_FK; “2” ] [ Select ]

Go to Next Field

Else

Go to Layout [ original layout ]

End If

Adjust Window [ Resize to Fit ]

Enter Browse Mode

End If

Maybe there is a better way to do this anyways, but I'm drawing a blank....

Thanks

I don't think you have given enough information for us to help - although there may be somebody who has had preciely the same problem and will step in with a solution.

In the meantime two questions. Exactly how does the script go bad at line 11? and the obvious What did you do yesterday that might have an effect on this?

I'm not sure what is happening, but since you are using FM8, I'd rather you use Get (Scriptparameter) and script variables ($ for local and $$ for global) istead of copy and paste. That way, your clipboard stays "clean".

There is more flaws in the reasoning, in line 1 ..."To what" might be a urgent question the answered, Set Field[ requires a reciever field as well as an argument!!!

Then isn't it particular precise when you writes:

checks to see if there is not already

What is this?? detection of uniqeness; or....??

--sd

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.