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.

Delete only the row of portal?

Featured Replies

I have a portal to show records from child to a parent layout. I put a script to delete the row of the portal-child record but FM deletes the parent not the original record in the row of the portal. Why is this happen?

Pascal

If the button with the script attached is IN the portal row; and if the script-step is Delete Portal Row and not Delete Record/Request then it should delete only the one child record unless, in the relationship, you have it set to 'Delete Related Records in this table when a record is deleted in the other table' and it is set on the Parent side (see relational dialog at the bottom). :wink2:

Are you using the Delete Portal Row script step?

You didn't give us a copy of you script so we have to guess.

  • Author

I use the delete portal row script and the relationship between parent and child has been only checked with the allow creation record in the child table, nothing else.

No script? No file? Nothing to go on?

If all you say is true, it should work. You have posted on forums long enough to know we cannot answer questions with NO information.

:idunno:

Is the relationship also to delete in the opposing direction? i.e., a child could delete it's parent.

  • Author

Finally I fix it .

I found that the new records were created by FM do not have problems, only the old records.So I have deleted all the records and imported again, that is all!

As for the file, sometimes believe me when you have 52 tables in a huge database and the langauge is not English, file cannot help very much.

Pascal

Thank you for the help.

Edited by Guest

file cannot help very much.

52 is all? Surprisingly, our jobs are many times to take over solutions such as your and make them work properly. :crazy2:

The file WOULD make a difference. Either what you described is inaccurate or your solution didn't really fix the problem you described ... data itself (no matter what the fields contain) will not delete portal records when you Delete Portal Row[]. Even if your script (which we never saw) had more in that deleted parent records, that script wouldn't fix itself If you now deleted all the records and imported.

I just don't buy it.

  • Author

I appreciate any help I took here. Please notice that I am not a professional, my occupation is to make new thinks for education, experiments and innovations. I just like FM.

The relation of the two tables is very simple, a parent an instance of parent a child. Group1, Group2 and child. Checked in the child allow and delete tables. The script in portal is:

Enter browse mode

Delete portal row

Go to the last row.

If you can wait I will reproduce the file in English and publish it.

Thank you again

Pascal

I can wait ... I look forward to seeing the issue in action.

  • Author

I send you attach a .zip file to see what I have done. I reproduce only the problematic tables and relations, it works fine but you better look at it. Relations, table Ids etc.

Pascal

Test_portal_delete_row.zip

Create an account or sign in to comment

Important Information

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

Account

Navigation

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.