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.

Am able to create records via Portal but not delete

Featured Replies

hello. i have a database similar to an invoice system. 3 tables:

(1) Invoice w/UID

(2) Products w/UID

(3) Line Items w/UID

I have the line item table linked to the Invoice table via InvoiceID. I put a line item portal in my invoice layout. And I have both "Allow creation of records..." and "Delete Records..." checked on the line items side. But if I make a mistake and clear a row in the line item portal on my invoice layout and re-enter a product, the Line Item record is not deleted. This is a problem for me, because I have a separate PRINT INVOICE layout which shows blank rows for Line Items which I thought i cleared (and deleted.)

How can I delete Line Item records via the Line Item portal in Invoice??

Thank you!

Put a button on the portal row that executes a script step, Delete Portal Row []

If you have allow creation of record on, you will get the button on the last "empty" portal row where you can enter new data.

If this bothers you, then you can use a global container to store your delete button and a calculation with container result of.

Case ( not IsEmpty (lineitem::LineItemID); gDelIcon)

  • Author

John you came thru again! Thank you! I will try both methods!

(What are the cons of using a script? Why would it bother me?)

No, I dont mean that the script would bother you. The delete button being on the last row may bother you because technically it will be on a row with nothing to delete. The last row of a portal when 'Allow creation of records' is on will be blank so that you can enter data for a new record. But by allowing this feature it will put the icon on the row as well.

  • Author

thanks john. i tried the script, and it worked!

  • 2 weeks later...

I'm trying to avoid displaying the "delete" icon before it's meaningful (that is, before the new line item record has been created) and I followed the formula described but the icon still appears as soon as the last row appears. I used another window to look at the LineItems table to verify that a new record had not been created yet.

The calculated container field is as follows:

uc_DeleteButtonIcon:

Case ( not IsEmpty (LineItem_ID); Resources::gx_BigDeleteButtonIcon )

Calc is unstored.

"Do not evaluate if all referenced fields are empty" is UNchecked.

Any idea why the icon is being displayed when LineItem_ID is nonexistent?

Thanks,

Chap

What is the relationship you are using for the LineItem_ID?

Pretty much what the O/P described. Invoices to LineItems by Invoice_ID, with both "allow creation..." and "delete related..." checked on the LineItems side.

Oops - sorry, misread. Are you asking in reference to the calculation? I just changed it from LineItem_ID to LineItems::LineItem_ID. Should I be using a self-join relationship on lineitems or something?

Edited by Guest
add 2nd paragraph

I;ll try. After opening, click the NEW button, and a blank invoice will come up. You'll see that the first line item already has X next to it.

gyeah. the zip file is 1.07M, and limit is 1.05M. was saved as a clone, no records. i don't get it.

any ideas? maybe a lossier zip algorithm?

Because your field that you have on the portal is the incorrect field. it is referencing the resources table's global image, not the calculation in the lineitems table.

*groan*

thanks for the second pair of eyes!

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.