Pinned Discussions
Forum Widgets
Recent Discussions
Required Fields Not Validating on Edit Form with Custom Save Button
I have required fields in one of my forms. I'm using a custom button to save the form. When I click the "Save" button, it checks for the required fields in the Add Form, but it doesn't perform the validation in the Edit Form. How can I ensure that required field validation works on the Edit Form as well when using the custom save button? This is the custom button formula: // Define the container style var text container = "display: flex;" & // Use flexbox layout for arranging children "justify-content: center;" & // Center all child elements horizontally "gap: 17px;"; // Add space between child elements // Define the subcontainer style var text subcontainer = "display: flex;" & // Use flexbox layout for subcontainer "justify-content: center;"; // Center all child elements horizontally // Define the button container style var text buttonContainer = "width: 130px;" & // Set fixed width for the button container "display: flex;" & // Use flexbox layout "flex-direction: column;" & // Stack buttons vertically "gap: 10px;" & // Add space between buttons "padding: 5px 3px;" & // Add inner spacing (5px top/bottom, 3px left/right) "border-radius: 8px;"; // Round the container's corners // Define the orange button style var text orangebutton = "border-radius: 40px;" & // Fully round the button's edges "color: #ffffff;" & // Set the button's text color to white "background-color: #f8761f;" & // Set the button's background to orange "font-family: Roboto, sans-serif;" & // Use Roboto font with sans-serif fallback "font-weight: 700;" & // Make the text bold "font-size: 12px;" & // Set the text size "padding: 12px 40px;" & // Add spacing inside the button (12px vertical, 40px horizontal) "display: inline-block;" & // Ensure the button behaves like an inline-block element "line-height: 20px;" & // Set the line height for text "text-decoration: none;" & // Remove underline from the button text "text-align: center;"; // Center the text inside the button // Define the black button style var text blackbutton = "border-radius: 40px;" & // Fully round the button's edges "color: #ffffff;" & // Set the button's text color to white "background-color: #252525;" & // Set the button's background to black "font-family: Roboto, sans-serif;" & // Use Roboto font with sans-serif fallback "font-weight: 700;" & // Make the text bold "font-size: 12px;" & // Set the text size "padding: 12px 40px;" & // Add spacing inside the button (12px vertical, 40px horizontal) "display: inline-block;" & // Ensure the button behaves like an inline-block element "line-height: 20px;" & // Set the line height for text "text-decoration: none;" & // Remove underline from the button text "text-align: center;"; // Center the text inside the button // Define the Record ID or placeholder if not available var text rid = If([Record ID#] > 0, // Check if a Record ID exists ToText([Record ID#]), // Use the existing Record ID "%%rid%%" // Placeholder for new records ); // Define the close window URL var text closewindow = URLRoot() & "db/" & AppID() & "?a=dbpage&pageid=11"; // URL to redirect to page 11 after an action, which closes the popup page // Construct the Submit URL var text Submit = URLRoot() & "db/" & Dbid() & // App root and database ID "?a=API_EditRecord&rid=" & $rid & // API call to edit a record using Record ID "&_fid_23=" & URLEncode("Pending FP&A Approval") & // Update status field with "Pending FP&A Approval" "&_fid_25=2" & // Update field 25 with value 2 "&_fid_26=1" & // Update field 26 with value 1 "&rdr=" & URLEncode($closewindow); // Redirect to the close window URL after editing // Construct the HTML structure "<div style='" & $container & "'>" & // Outer container with flexbox layout "<div style='" & $subcontainer & "'>" & // Subcontainer centered within the outer container "<div style='" & $buttonContainer & "'>" & // Button container for Cancel button "<a style='" & $blackbutton & "' href='" & $closewindow & "'>Cancel</a>" & // Cancel button styled as black "</div>" & If([Payment Request Status] = "New", // Conditional logic for Submit or Save button "<div style='" & $buttonContainer & "'>" & // Button container for Submit button "<a class='SaveBeforeNavigating' data-replaceRid=true style='" & $Orangebutton & "' href='" & $Submit & "'>Submit</a>" & "</div>", "<div style='" & $buttonContainer & "'>" & // Button container for Save button "<a class='SaveBeforeNavigating' data-replaceRid=true style='" & $Orangebutton & "' href='" & $closewindow & "'>Save</a>" & "</div>" ) & "</div>" & "</div>" This is the code page content: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> </head> <script> window.close(); </script> <body> </body> </html> Any help would be greatly appreciated!0likes4CommentsUser Focus Table Bug - New Record ID not being passed from source table to user focus table
I have a User Focus table that has worked without any issues for nearly a year. Today, a user let me know that records stopped appearing on their end partway through the day (the API_RunImport call needs to work for them to see the records on their end once created). The first 12 records they created worked fine, then suddenly, new records stopped behaving as expected. After some investigation, I found that the problem is due to the Record ID (RID) from the source table not being written to the User Focus table. This breaks the subsequent API_RunImport, since there is no RID to tell the import which record to merge with. The workflow was still working fine earlier today, then stopped without any changes being made. Context: I am the only builder for this app and no one else has access to change fields or formulas. No recent changes have been made to the fields involved. I have run several tests, but the RID ([Record ID#]) is consistently not being passed through anymore. All other fields are still being written correctly to the User Focus table. Workflow Summary: User creates a new record in the Immature Plant Batches table. A Formula-URL button is clicked, which triggers the logic below and reloads the form. The form is set to auto-save when redirected. Here is the relevant portion of the formula: var text ProductionAddUser = URLRoot() & "db/" & [_DBID_USER_FOCUS] & "?act=API_AddRecord" & "&_fid_6=" & ToText(User()) & "&_fid_118=" & URLEncode([Record ID#]) & "&_fid_119=" & URLEncode([Plant - Strain]) & "&_fid_143=" & URLEncode([IMPB - Next Immature Plant Batch Suffix - Production]); var text ProductionEditUser = URLRoot() & "db/" & [_DBID_USER_FOCUS] & "?act=API_EditRecord" & "&key=" & ToText(User()) & "&_fid_118=" & URLEncode([Record ID#]) & "&_fid_119=" & URLEncode([Plant - Strain]) & "&_fid_143=" & URLEncode([IMPB - Next Immature Plant Batch Suffix - Production]); var text ProductionEditOrCreateUser = If([Current User - User Exists?], $ProductionEditUser, $ProductionAddUser); var text RunProductionImport = URLRoot() & "db/" & [_DBID_IMMATURE_PLANT_BATCHES] & "?act=API_RunImport&ID=14"; var text NewProductionBatch = URLRoot() & "db/" & Dbid() & "?a=API_GenAddRecordForm&dfid=15" & "&_fid_57=" & URLEncode([Related Scheduled Task]) & "&_fid_77=" & URLEncode([Related Planned Harvest]) & "&_fid_17=" & URLEncode(Today()) & "&_fid_8=" & URLEncode([Related Planned Harvest - Location]) & "&ifv=1&hs=1" & "&z=" & Rurl(); var text ProductionBatch = $ProductionEditOrCreateUser & "&rdr=" & URLEncode($RunProductionImport) & URLEncode("&rdr=" & URLEncode($NewProductionBatch)); $ProductionBatch Again, everything except for the RID from the source table not getting passed and written to the user focus table anymore. Without that RID, the import fails to find a matching record to merge. Has anyone experienced something similar recently? Or does anyone have ideas why [Record ID#] might suddenly stop resolving mid-day when it was working previously? Thanks in advance for any insight. I am really stumped here.0likes3CommentsReport help, take 2
Figured out my first one (well, kind of). I'm building a summary report summarizing several check-box fields. Two questions: Is there a better way to do this where I want summaries of a LOT of check-box fields? It looks like the cap of line items to summarize is 24 Do I have to "Group by Rows"? I basically just want a total summary, but don't want to group it. Speaking in Excel terms, what this might look like in an ideal world is: Rows that are limitless, identifying each field to summarize Columns are only two -- 1) The title of the field being summarized, and 2) distinct count Here is what I'm looking at, and I ended up just creating a summary field generally to just have one summary row.... but really, I just want the bottom line.0likes0CommentsNew Mobile Form
Is anyone haveing trouble with lookup fields on the new forms not populating? I have switched a few forms to the new style and it seems to now want to populate the lookup field sometimes the search function will pull in a result but 99% of the time it just says 0 results I have over 400 choices in this field it usually shows me the first 100. Is anyone else expierencing these issues?0likes1CommentReport help
Hello! I'm diving into someone else's app, trying to wrap my head around their reporting needs. The previous admin created several "checkbox" fields that are in reality, types of answers to a master field. I need to tally each checkbox and ideally, I'd love to get this all on one report. I theorize the reason they did individual checkboxes vs. one multi-select field is because, in my own experience with multi-select, a report of such won't cleanly count how many times each item was selected, but will report out instances of the specific combination of what was selected. In my example, I'm tallying types of support received, where there are 10 sub-types as check-boxes, so ideally this report shows the exact count of each type of service counted. Please and thank you!0likes1CommentRegEx replace
Hello, I'm trying to implement a regex replace to remove all special characters from a field. However, it's not working as expected. The result still shows certain special characters and line breaks. Here is an example. Could you provide the regex pattern you're using and the example text? This will help me understand the issue better and offer a more precise solution. RegexReplace([field_name],"[^A-Za-z0-9 ]", "") If you have any ideas on how I can refactor my formula, I'd love to hear them!0likes0CommentsMandatory Multiple Attachment for a Record
Hi, I have a use case where I have to attach the multiple attachment for a record and if the attachment is not attached then it should not allowed user to save the record. However, I have created a separate table for storing attachments and formula url button in parent table which redirects the user to the child table to create the record for Attachment and created dynamic form rule if Attachment required =yes and #of Attachment =0 abort save. But the issue is if user have provided all the details and missed to attach the attachment it is not allowing user to redirect to another page for adding attachment without saving the record and record cannot be saved because user has missed the attachment and if user wants to attach attachment they have to refresh the page first which results in loosing all the data which user has filled in the form. If I change the URL properties to popup window then also attachment will not be visible until user refresh the page. Kindly suggest the better way to add multiple attachment for a record, even user missed the attachment it should not allowed them to save and let them add attachment without refreshing the page. Thanks0likes1CommentYTD Reporting-Best Practices
Hello! I am working on a monthly and yearly sales report and I have run into a hiccup. Scenario: I have a record that is a booking ("sale") that is made in Jan 2025 and then in Mar 2025 the booking is cancelled. The way I have it now is that when the booking is made, the status field changes from quote to booking and then when cancelled, the same field changes to cancelled. In my YTD report, this is causing the booking made in Jan 2025 to not show up due to the cancel in Mar 2025. I understand it is a wash, but I still need the booking to show up in Jan 2025 and then the cancel show in Mar 2025. So, this is what I am thinking for a solution: Create a date field unrelated to the status field that will populate when a cancel occurs and have the report pull of the booking date/status and also from the cancel date report and that should then show both transactions OR create a separate table that will hold the numbers at month end for each month and pull the YTD report from that table? I would just like any input/advice from someone more knowledgeable than myself. I am hoping I am thinking about this in the right way. Thank you, Kim0likes1Comment