Pre-populate a form

245

Answers

  • michael tomlinson
    michael tomlinson ✭✭✭
    edited 10/17/19

    Hi Andree,

    I have checked and things appear to be working.  The issue I run into is when making the reference using (for my purposes)           

    "?Column%20Name=SUBSTITUTE([InfoHere]@row#)"

    What shows up in my Column Name box is literally

    "SUBSTITUTE([InfoHere]@row#)"

    I hope that makes sense.  I'm happy to post the actual information if that's better.  I'm just not sure why the system isn't ingesting the call to substitute.  (There's a decent likelihood that I'm missing part of the formula somewhere.)

    Also, thank you to everyone helping on here.  It's been a life saver multiple times over.

  • Hi Michael,

    You need to be building up the url as a string. Smartsheet is not calculating the value because the substiture command is inside the quotes. Try:

    "?Column%20Name=" + SUBSTITUTE([InfoHere]@row," ","%20")

     

    In terms of troubleshooting, it can help to build up your calculation one step of the time, ie set the fomula to =SUBSTITUTE([InfoHere]@row," ","%20"), check it looks right, then add the column name

    ="?Column%20Name=" + SUBSTITUTE([InfoHere]@row," ","%20")

    then add any other columns

    ="?Column%20Name=" + SUBSTITUTE([InfoHere]@row," ","%20") +"&Column%20Name2=" + SUBSTITUTE([InfoThere]@row," ","%20")

     

    then add the URL to the form at the front....

  • Andrée Starå
    Andrée Starå ✭✭✭✭✭✭

    Happy to help!

    I saw that Andrew answered already!

    Let me know if I can help with anything else!

    Best,

    Andrée

    SMARTSHEET EXPERT CONSULTANT & PARTNER

    Andrée Starå | Workflow Consultant / CEO @ WORK BOLD

    W: www.workbold.com | E:andree@workbold.com | P: +46 (0) - 72 - 510 99 35

    Feel free to contact me for help with Smartsheet, integrations, general workflow advice, or anything else.

  • Wayne Kung
    Wayne Kung ✭✭✭

    This all makes sense!

    I've figured out how to build the pre-populating URL without issue, but rather than having the not-so-user-friendly URL showing in the cell, I'd like them all to display something like "Form". I quickly learned that making this change in the first cell and propogating down doesn't work, since they would all share the same pre-populated fields as the first line.

    Is there a way to update the entire column's Display settings at once, or am I destined to do this line by line?


    Thanks!

  • HI! I stumbled across this having a similar issue. I am working with the URL query presented above, and keep getting 'Unparseable' coming back when I complete the URL. The purpose of pre populating my form is to pull in 'Person Number' (employee ID) and the 'Manager ID' into the form to capture performance data. I've worked on it with different variations and can't figure out why it's not working. Any insight would be greatly appreciated!

  • Andrée Starå
    Andrée Starå ✭✭✭✭✭✭
    edited 04/27/20

    @Heather Piel

    I think it's the quotes.

    Was that the reason?

    SMARTSHEET EXPERT CONSULTANT & PARTNER

    Andrée Starå | Workflow Consultant / CEO @ WORK BOLD

    W: www.workbold.com | E:andree@workbold.com | P: +46 (0) - 72 - 510 99 35

    Feel free to contact me for help with Smartsheet, integrations, general workflow advice, or anything else.

  • liz.mayeux
    liz.mayeux ✭✭✭✭✭

    Hi - I have been following these comments as well. Can you post a picture of the form that is pre-populated with the working formula?

    I was able to enter a formula that opens a form, but it just enters a new row on my sheet and I'm still entering the information in manually.

  • liz.mayeux
    liz.mayeux ✭✭✭✭✭

    Hi Again - So I was able to make the formula to work to pre-populate the form. Now I was wondering how you prompt people to use the form. Currently the cell is the hyperlink but it shows the whole http address and I would like it to describe the form they are going to enter information into.


    How do you lock down the pre-populated information so it can't be edited in the form. If I make a change to any of the prepopulated fields, i create another row in my sheet and it throws off my intake sheet.


    Thanks!

  • Paul Newcome
    Paul Newcome ✭✭✭✭✭✭

    @liz.mayeux You would need to include a column next to the URL that describes the form, or you can use the help text/description fields in the form itself to be able to provide a description for it.


    To lock down specific fields, try making them "Hidden" on the form.

  • liz.mayeux
    liz.mayeux ✭✭✭✭✭

    It's me again - pre-populating the form formula is working great! When I fill in the blank cells of the form and hit submit a new row is created. I would like the row to be back populated. I thought I had it working but now it doesn't work. This is my formula:


    ="https://app.smartsheet.com/b/form/1e382154fd574bc3926b76eb05ccac11?Project%20Number=" + SUBSTITUTE([Project Number]@row, " ", "%20") + "&Customer=" + SUBSTITUTE(Customer@row, " ", "%20")

  • Paul Newcome
    Paul Newcome ✭✭✭✭✭✭

    What do you mean by "back populated"?


    It looks like it is dropping off before the first SUBSTITUTE function. I have found through testing that sometimes accounting for special characters/spaces can be a little tricky. For example...


    If I have a cell that contains the email address "JohnDoe@email.com", I can't just drop the cell reference into the formula that generates my URL. I actually had to separate the email prefix from the domain into two separate columns ("JohnDoe" and "email.com" in their own column, then use the following to generate the URL that would pull the email:

    =................................................ + [Email Prefix]@row + "%40" + [Email Domain]@row


    The "%40" is read as the "@".


    THIS LINK has a table that explains what some of the special characters need to be entered as.


    You may need to create a separate column that houses the SUBSTITUTE functions as standalones and then reference that in your URL formula.

  • liz.mayeux
    liz.mayeux ✭✭✭✭✭

    I apologize, but I have been working on this formula and output for 2 days so I'm a little frustrated lol

    I have a pic showing my "list" of entries w/ the formula for the pre-populated form in the Forms column

    When I open my pre-populated form, I would like to enter the location and have it back fill the row the form is attached to. Unfortunately, it is just creating a duplicate row with new info.

    Please ignore

    the #invalid operation - that was something else I was working on

  • Paul Newcome
    Paul Newcome ✭✭✭✭✭✭

    You really like to make thing complicated. Haha. To be able to enter data into a previously used row using a form type of structure, you would need to use an Update Request.


    or


    You would continue to use the form, but ensure you have some type of unique identifier (maybe a hidden field that replicates the custom URL) that we can use to match things up and then use formulas to pull the data. At that point though, I would recommend having the form populating a different sheet so that cross sheet formulas are used (and the formulas would actually end up being much more simple as well).