Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

Am able to create records via Portal but not delete


This topic is 6454 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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!

Posted

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)

Posted

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?)

Posted

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.

  • 2 weeks later...
Posted

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

Posted

What is the relationship you are using for the LineItem_ID?

Posted (edited)

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
Posted

Can you post a copy of your file?

Posted

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?

Posted

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.

This topic is 6454 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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