Prefilling forms

John Schell
John Schell ✭✭
edited 05/09/23 in Formulas and Functions

I am prefilling a form designed using worksheet "B" with data from worksheet "A" using the Substitute function. Worksheet "B" is a test defect tracker, worksheet "A" is a test script tracker. If a test script fails. I want to take several fields from the test script tracker, prepopulate them on a form developed using the defect tracker, have the tester fill out some additional information and then have the entire form update the defect tracker with the combination of prefilled data and manually entered data. The following formula is working.

=IF(AND([Primary Test - Results Dropdown Menu]@row = "Fail", [Defect Number]@row = ""),

"https://app.smartsheet.com/b/form/e3828156241842278a19db84dd6cf1c9?Test%20Case%20ID="

+ SUBSTITUTE([Test Case ID]@row, " ", "%20") + "&" + "Tester%20Name=" + SUBSTITUTE([Primary Tester Name]@row, " ", "%20") + "&" + "Test%20Case%20Name=" + SUBSTITUTE([Test Case Name]@row, " ", "%20") + "&" + "Test%20Scenario=" + SUBSTITUTE([Test Scenario]@row, " ", "%20") + "&" + "Failed%20Step=" + SUBSTITUTE([If Fail Add Step #]@row, " ", "%20") + "&" + "Date%20Defect%20Identified=" + SUBSTITUTE([Date Defect Identified]@row, " ", "%20") + "&" + "HRC%20Module=" + SUBSTITUTE([HRC Module]@row, " ", "%20") + "&" + "Defect%20Description=" + SUBSTITUTE([Defect Description]@row, " ", "%20"), "")

Unfortunately, if the composer of the test script uses a comma in their test script text the formula will pre-fill up to the point of the comman and then will not pre-fill anything beyond that. This also appears to be happening intermittently meaning that I have seen comma's used successfully then others stop the pre-filling immediately. No idea what is going on here.

Answers

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!