Jump 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.

Featured Replies

Hi, I have a bunch of portals with a delete portal row button and it works fine. I am just wondering if there is a script set in FM where the portal row I want to delete gets highlighted so I know if I clicked the correct "x" button to delete the portal row? 

 

Thanks 

 

You obviously want to combine this with a confirmation dialog (if you haven't already done so); otherwise the row gets briefly highlighted, then it's gone anyway …  :ermm:

 

You can conditionally format one or more fields in the portal row (not the row per se, alas) with a condition like $$selected = portalTO::keyField; then write a script like …

 

Set Variable [ $$selected ; portalTO::keyField ] // triggers CF highlighting

Refresh Window

Show Custom Dialog [ "Really delete?" ; "bla bla"; "Yes" ; "No" ]

If ( Get ( LastMessageChoice] // if delete button was pressed

Delete Portal Row [No dialog]

End If

Set Variable [ $$selected ; "" ]

Commit Record

 

Alternatively (or additionally), capture the name of the row (whatever identifies the record best) and display it in the dialog box.

  • Author

You obviously want to combine this with a confirmation dialog (if you haven't already done so); otherwise the row gets briefly highlighted, then it's gone anyway …  :ermm:

 

You can conditionally format one or more fields in the portal row (not the row per se, alas) with a condition like $$selected = portalTO::keyField; then write a script like …

 

Set Variable [ $$selected ; portalTO::keyField ] // triggers CF highlighting

Refresh Window

Show Custom Dialog [ "Really delete?" ; "bla bla"; "Yes" ; "No" ]

If ( Get ( LastMessageChoice] // if delete button was pressed

Delete Portal Row [No dialog]

End If

Set Variable [ $$selected ; "" ]

Commit Record

 

Alternatively (or additionally), capture the name of the row (whatever identifies the record best) and display it in the dialog box.

 

Actually I think the second way would be better. For example, Because each portal row begins with the field "date" I can maybe capture the date and insert it in the dialogue. Do you know the easiest way I can do that?

Oh its ok I figured it out using a script parameter thanks! 

Actually I think the second way would be better. For example, Because each portal row begins with the field "date" I can maybe capture the date and insert it in the dialogue. Do you know the easiest way I can do that?

Oh its ok I figured it out using a script parameter thanks! 

 

Not sure how a Script Parameter would help when clicking on an arbitrary field…? Just capture the necessary data from the portal row:

 

Set Variable [ $myDate ; GetAsText ( portalTO::myDateField ) ] // the date you want to display

Show Custom Dialog [ "Delete " & $myDate & "?" ; "Really delete record from date " & $myDate & "?" ; "Yes" ; "No" ] // use date in dialog

If ( Get ( LastMessageChoice] // if delete button was pressed

Delete Portal Row [No dialog]

End If

 

 

You can also use portalTO::myDateField directly in the calculation for the dialog box, but IMO this style is a bit clearer.

Create an account or sign in to comment

Important Information

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

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.