question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Bug with List data validation for pure input

See original GitHub issue

Here’s the scenario:

        sheet.cell("B2").dataValidation({ type: 'list',
          allowBlank: false,
          showInputMessage: false,
          prompt: '',
          promptTitle: '',
          showErrorMessage: false,
          error: '',
          errorTitle: '',
          operator: '',
          formula1: 'test1',
          formula2: ''
        });

This works fine,

But once I change formula1 to be multiple items, like on the example on the npmjs page

{
    type: 'list',
    allowBlank: false, 
    showInputMessage: false,
    prompt: false,
    promptTitle: 'String',
    showErrorMessage: false,
    error: 'String',
    errorTitle: 'String',
    operator: 'String',
    formula1: 'Item1,Item2,Item3,Item4',//Required
    formula2: 'String'
}

I get error when I open the excel sheet.

When I went back to the first try that worked with a single item, I found that in the data validation box for excel there was this entry for Source =test1

Looks like the equal is appended to whatever formula1 is. Which won’t work for a static list.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:13 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
alandoyle95commented, Jan 18, 2018

No Problem 😄 This Repo is what my company currently run off of… so I like to try to help maintain it 😄

I have 500+ excel forms a day that get modified by this repo

1reaction
Jia265commented, Jan 18, 2018

Hey alandoyle95, thanks for responding. I just also wanted to add, the first case works fine isn’t exactly right.

The first case just doesn’t error out when I try to open the excel sheet, it doesn’t have any items for the actual dropdown. And when I try to edit the dropdown value in the excel sheet, I would get an error for invalid range, regardless of whether or not I use a range.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Excel Data Validation Tips and Troubleshooting - Contextures
The videos and written steps below will help you with data validation drop down list troubleshooting in Microsoft Excel.
Read more >
Excel validation list allowing invalid inputs - vba - Stack Overflow
Just found out this same bug the hard way... A blank cell in a Data Validation List will make the whole validation useless/non-blocking....
Read more >
Bug in Data Validation - Option Pulldown list (Excel 2010 SP1)
1. Go to Excel the cell A1; · 2. Go to Data validation and select the list option (pulldown list) and add the...
Read more >
Data validation in Excel: how to add, use and remove - Ablebits
In the Source box, type the items of your Excel validation list, separated by commas. For example, to limit the user input to...
Read more >
Automatic Detection and Repair of Input Validation and ...
Automatic Detection and Repair of Input Validation and Sanitization Bugs. A Dissertation submitted in partial satisfaction of the requirements for the ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found