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.

Script does not assign value in the Field

Featured Replies

hi,

I an new to scripting. I have made a this script myself. Script does execute fine. But there is one little problem with it. At some specific point it does not assigns value to the field. I don't know why. I am attaching the image of my script. Because i don't know how to export it in TEXT format. I am highlighting the part that suppose to assign a value in the field.

post-106853-0-73032700-1348432664_thumb.

post-106853-0-23301400-1348432666_thumb.

Hi!

I believe you need to add a Commit Record/Request immediately before the Delete Record. It has caught me before. You cannot delete a parent if it has a current child still active (as in your situation).

  • Author

Hi!

I believe you need to add a Commit Record/Request immediately before the Delete Record. It has caught me before. You cannot delete a parent if it has a current child still active (as in your situation).

But i am not trying to delete the Parent Record. I am in Sale Detail table. Which is child of Sale Table and i am deleting it in Sale Detail.

In the box i have highlighted. The second last command set variable. it does not assign value in Product Tables Stock field. Although i have debugged the script the variable contains my required value, It is not assigned to the Stock Field! Why?

I understand ... but by parent, I mean you are trying to delete the record you are currently on. But it cannot set that related record with a value if ITS parent does not exist and FM therefore will not allow that related Set Field[]. Did you try the Commit?

EDIT LATER ... it would probably be clearer if I said that, it isn't that FM stops the Set Field[], but since there is no commit before deleting the 'parent', it reverts it.

Edited by LaRetta

  • Author

I understand ... but by parent, I mean you are trying to delete the record you are currently on. But it cannot set that related record with a value if ITS parent does not exist and FM therefore will not allow that related Set Field[]. Did you try the Commit?

thanks bro, you just saved my 50$. Thank you very much. :laugh:

It's a bit of a tricky-wicket because you would think that, by deleting the child's parent, that WOULD be a commit in its purest sense, LOL. I LOVE having these kinds of things happen to me because they stick very deep (although sometimes painfully).

I will NEVER forget how to use 'Do not evaluate if all referenced fields are empty' for that very reason.

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.