AnsweredAssumed Answered

Adding or deleting records via portals

Question asked by RonJennings on Nov 26, 2012
Latest reply on Nov 26, 2012 by philmodjunk


Adding or deleting records via portals


     Still working on the audit project I mentioned in previous posts and we are doing it much more relationally than  I had originally anticipated.  Here is the current challenges

     1) I have a layout (call it Audit_Common) with the basic information that will be captured for ALL of the audits.  At the bottom I have a portal that links to the table where photos are stored (creatively called Photos).  A relationship is established so that each audit (which is serialized) does accurately pull up it's associated photos (also serialized).  I can add photos directly into the Photos table and right now I manually enter the associated audit number for the Audit but the desire is that from the Audit_Common layout, to use a button that will allow the user to take a photo with their iPad or browse to a file on their computer & select a photo, get a dialog confirming they want to keep/use the photo, on a YES the photo is retained and entered into the Photos table with and the Audit number automaticly entered, and the current Audit is refreshed so that you can see the photo in the portal (along with any other photos already taken of course).  On a No response, the photo just taken is discarded, no tables are modified in any way, and we revert to the Audit_Common layout.  

     2) I thought I had the answer for this next one but I turned out to be quite wrong...  Within the area of the portal in Audits_Common that displays the images from Photos, I created a button with a script to (I thought) delete the photo that appears beside it in the the portal.  What actually happens from that button is it deletes the Audit currently being viewed and the photos stay quite intact over in the Photos table.  How do I get the deletion script associated with the correct record (photo) & table?

     3) When I click on an existing photo to view it on an iPad, it brings up a full-size image to view.  But when I click the photo while viewing on a PC/Mac, it just selects the field as if to change/delete the image.  The desired behavior is that clicking on the image brings up the full size for viewing and that the only way to delete a photo would be via the button (or going directly to the Photos table but that table won't be accessable to the users). Not certain if that is possible or not.  Am I needing to lock the photo in some way and add another button that will display the full size?  How would that look?

     Thanks for any help/info.