March 15, 200718 yr 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!
March 15, 200718 yr 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)
March 15, 200718 yr 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?)
March 15, 200718 yr 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.
March 28, 200718 yr 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
March 28, 200718 yr 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 March 28, 200718 yr by Guest add 2nd paragraph
March 28, 200718 yr 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?
March 28, 200718 yr 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.
Create an account or sign in to comment