How can I use conditionnal data validation to check wether user enters a formula or a value? - validation

I want to use conditionnal data validation in google spreadsheets for let's say cell A1 based on a custom formula to check wether a user entered a formula or some random value that should be rejected.
Here is the custom formula for the data validation: =ISFORMULA($A1)
Here is the test formula I enter in cell A1: =ROW(D4)
and here is the other value I enter that should be rejected: a
So one is a formula the user should be able to write and the other a value a that should be rejected.
I get weird behaviours, sometimes the error message pops up, sometimes don't and even when the cell contains a formula I get a text attached to the cell telling me the value doesn't meet data validation's criteria.
Here's the spreadsheet link

After some investigation with JSmith it looks like some bug in GS. If your custom formula is self referencing and is using:
=ISFORMULA(A1)
to make it work you have to change "On invalid data" to "Show warning" (not "Reject input"). Its weird but works (but you have to live with red triangle).
Other tested formulas seems to work...

Related

Adding a drop-down menu (data validation) after each row of a query result in Google Sheet

First, here is the link to my sheet:
https://docs.google.com/spreadsheets/d/1067N1SAIwpGkMRBZiUv4JW8yDNkozuGt7Fwh6GW-qvE/edit#gid=1742559851
If you look at the tab called "Selection", I have two columns called "Select". All the data in these tables is collected by a query function, except column "Select". In that column, I need to add Data Validation (a simple Yes or No). I want the Data Validation to be automatically added when a new row is created but the query function instead of having to add or remove it manually every time I make some changed. Data collected by the query function is using the two variables on top of the sheet (minimum rating and global buff).
Just to show the step to apply data validation to your whole column, see the following image. Under Cell Range, the image shows Selection!D5:D99, but this is actually set to Selection!D5:D999, it just is truncated due to the size of the text box.
Let us know if this is what you were looking for, or if I've misunderstood your issue.

Unclear Document regarding AEM form validation

Hi everyone wonder if anyone can provide pictures or the exact steps pertaining to how to locate the "validation expression according to this link https://helpx.adobe.com/experience-manager/6-3/forms/using/adaptive-form-expressions.html#main-pars_header_3
Also while you are here I am wondering if it is possible to use these validation tools to check if the income is greater than the cost. i.e the user have to key in a higher value in the income numeric box as compared to the cost numeric box. If not providing a guide that allows me to do this would be great.
Many thanks in advance!
The validate expression is written using the Code editor of the rule editor. For e.g., I've created an adaptive form with 2 Numeric Boxes (Income and Cost) as shown below.
So, to validate if the value entered in the income is always greater than the cost, then click on the Income field and then click the Edit Rules icon. This will open the rule editor
Once in the rule editor window, click on the Income field on the left rail and then click the Create button.
In the Create Rule window, you can use the Validate event and configure the required condition.
You may also need to write a similar condition on the cost field as well, but in reverse (Cost is less than Income) so that when someone changes the value in the Cost field, it is validated too.
As far as your original question goes, if you switch to the Code Editor, it should give you another editor where you can write Javascript to validate the value. The validation expression from your documentation link goes there (see below).

Google Sheets - Dynamic Cell Range For Data Validation, Specifically List Of Items Criteria

I am having some issues with specifying a dynamic cell range for a "data validation".
I'm aware you can do some tricky stuff with = "Projections!M4:M"&O2. You can update the content of cell O2 for example to 3 and the output would be Projections!M4:M3.
This makes the value "dynamic". These tricks don't seem to work in the "Cell Range:" input field in the Data Validation selection/configuration screen.
My problem is, I hate seeing drop down arrows (call me o.c.d) for rows that have no content, my number of rows will grow in the future so I don't have any other option than selecting M4:Mfills the whole 1002 rows with drop down arrows.
Has anyone worked out a trick to make dropdown arrows only show up for rows that are filled?
I'm using = COUNTA(B4:B)to get the number of rows that are filled and = "Projections!M4:M"&O2 to make the desired Projections!M4:MX string but the "Cell Range" input field in the Data validation screen doesn't accept this as valid either.
Well I didn't find a direct solution, but something that I can work with to resolve my issue which was I hate seeing drop down arrows for empty rows.
I turned a filter on for a column that will always be filled in and filtered by conditions Cell is not empty but i'd prefer a better solution.

Tableau checkbox filter to suppress zero rows

I'm pretty new to Tableau, and am unsure how to implement a feature that's been requested by business users.
We have a report where each row has
Owner - grouping text field
Scenario - text field
Functional Area - text field
A graph of values over time
Each of these rows (i.e. Scenario) has a dimension named Latest Occurrences, which has the latest integer value from the graph.
I want to have a checkbox filter on the side of the report named "Show empty scenarios" where if it is checked it shows the scenarios where Latest Occurrences >= 0, and if unchecked shows the rows where Latest Occurrences > 0. I'm entirely unsure how to implement this in Tableau, does anyone know how?
I've come up with an answer that allows suppression of non-zero rows, but it's not a checkbox by itself, rather a dropdown with multiple checkboxes. I'll leave this question open in case someone comes up with a way to do that.
My solution, currently, is to create a calculated field called Scenario Issue Status with the following definition:
IF([Latest Occurrences] > 0)
THEN 'Current issues'
ELSE 'No current issues'
END
Then add that as a Filter with "Current Issues" checked and "No current issues" unchecked, make that filter visible, and change the filter type to "Multiple Values (dropdown)". That's about as aesthetic as I can make it, though it's not a simple suppression checkbox.

In EWL, can you alter a form item’s contents after a failed validation?

On an EWF page, is it possible to alter the content of a form item during validation (when a validation fails)? For an example: say you have a text box that you want to be spell checked before it gets entered into the database. You use the modification's GetSpellCheckedWordTextFormItem to get the form item, and you want to replace what the user enters ("teh") with a likely suggestion ("the") when the validation fails to find a word it knows. Then the user sees the validation error ("Is this the word you meant?"), looks at it and corrects it or not, then re-submits.
Is there a way to do that? If so, how?
The specific answer to your question is no, you can't alter any form values if validation fails. To implement this, you'd need to let the validation succeed and let the data get modified. As part of the validation/modification, you could set a piece of page state that causes the next loadData pass to display the "is this the word you meant?" message near the spell-checked form item. Of course, you would have already saved the corrected text.
Alternatively, you could use PostBack.CreateIntermediate to make a post-back that only runs the spell-check, puts the corrected text in page state, and displays "is this the word you meant?". You'd set that post-back to fire when the user tabs out of the text box, and then you'd have the main post-back grab the corrected text from page state and save it in the database or other durable storage.

Resources