I am trying to make a form that will give users a list of possible defects to choose from when reporting a customer complaint. First they will choose from a list of regions on the product where the problem exists and then they will choose from a list of possible defects which will populate based on the location selected in the first list. I have made the list of regions as comprehensive as possible but I feel that it is likely that something will arise where I have not forseen this issue as a possibility. As such I would like to include an "Other" option in the location drop down list which, when selected, would change the second data entry point from a data validation list to allowing the user to typ anything the user would like to add. Is this possible to have the type of data validation dependent on a condition?
Dependent dropdown lists validation. Reference youtube video one and two
You can mention "Others" option on the top of the source list for the first (Location) validation. You can then add data validation for the first list using named range with offset function. This will allow you to freely add other locations at the bottom of the list.
For the second column validation, you can enter formula skipping the first ("Others") cell in the location list.
In the image below, validation source list for column D is $A$2:$A$10 and validation list formula for Column E is =IF(COUNTIF($A$3:$A$10,$D2)>0,$B$2:$B$10,$E2)
Related
I restrict the options (an ID) for column A:A to those given in a drop down menu.
The possible elements are in K1:K10. In L1:L10 there is a flag (0/1) whether the ID is currently already in use or not.
Now I want to restrict the options in the drop down menu to those from K1:K10 which are flagged as 0 in L1:L10. Those flags can change multiple over the life sycle of that document. While in use, I don't want that ID to be selectable. Ones no longer flagged as in use, I want it to become available again.
Depending on your Excel version this may be a solution, as Validation Lists can refer to dynamic arrays.
Use the FILTER function to create a dynamic array of valid names in cell M1.
=FILTER(K1:K10,NOT(L1:L10))
Then set the Validation List to =$M1$#. NB the # is important as it tells Excel you are using a dynamic range rather than a standard cell reference.
and now (if you have Calculation set to Automatic) you should see the list of available names change as you change 1's and 0's in Column L.
For my project, in order to improve user-friendliness, I decide to switch from just dependent dropdown list to dependent AND searchable dropdown list.
The first cell (call it A1) is where the plastic group is input (Plastic group is TPU, PA, Nylon...), the second cell is a dropbox, where I'll type a part of the material name inside and it will show me the suggestions. The typed material name in the second box is dependent on the first one. For example, if I have "TPU" in the first cell and "660" in the second, only TPU materials with "660" as part of their names will appear in the suggestion drop-down list.
I'm able to make "just dependent" and "just searchable", but is there anyway to combine these two together?
Thanks for your help.
I have tried the dependent route, using INDIRECT function and naming the sub-list of specific material names by their group. Currently, I'm "going around" by combining them all together in a single list (Material name) - they are not sorted by group and that is not what I want.
I´m trying to set up unique values in my PowerApp-Form. The data is stored in a Sharepoint list. I have a column called watches, items in this column have a unique number, which have to be unique. People can pick multiple of those watches in a LookUp-field. But before submitting the form, I need to check if those picked values already exist in my list and at least display an error message.
I have setup a regular text field and added following rule to it:
If(LookUp(MyList.Watches;DataCardValue4.SelectedItems.Value in Watches;"OK")<>"OK";"No Error";"Watch already exist")
DataCardValue4 is my LookUp field, where people can pick those watches. With this rule I want to check if a item already is in my column watches and let my text field display the error. Somehow the rule doesn´t work.
Can you tell me how I compare multiple lookup choices to my table/column entries?
The first parameter to the LookUp function should be the table (SharePoint list) rather than the column. So the first parameter should be 'MyList' rather than 'MyList.Watches'. Also, I'm not sure that the formula provided (second parameter to LookUp) will work. In your formula, you will be looking for multiple items (DataCardValue4.SelectedItems.Value) within multiple items (Watches). Perhaps you can update your app to have users only pick one watch value before submitting?
One last thing to note. I'm not sure how big you expect your SharePoint list to get, but I would highly recommend keeping your LookUp formula within the bounds to support delegation. More specifically, SharePoint has different formula requirements than other connectors. For example, you can use '=' in your formula, but not 'in'.
Your new rule might look something like below. Please note that it could have syntax errors and might not even be delegable in it's current form since I am providing the rule with no checking. Also, I switched from using LookUp to using Filter instead just because I'm more familiar with Filter. However, both functions are very similar.
If(CountRows(Filter(MyList; DataCardValue4.Selected.Value = Watches)) > 0; "Watch already exist"; "No Error")
E.g. there is a list with gazillion required fields and I want the users to be able to fill out whatever they can and save as a draft until they have full info? Is there a simple solution for this? Tia!
Option 1: Multiple Content Types
One approach is to have two different Content Types on your list: one for draft items and one for submitted ones.
Content types on the same list can have different settings for the same columns. This means you can make the fields optional on the "draft" content type while making them required on the "submitted" content type.
The downside is that it may not be intuitive for end users if they're required to manually change the "Content Type" field in order to publish their draft.
Option 2: List Validation Settings
Another approach is to use List Validation settings instead of making fields required.
List validation lets you specify an Excel like formula (from which you can reference column values) which must evaluate to true in order for the validation to succeed. If it evaluates to false, a validation error message is displayed instead (you can specify the text of that message) and the item cannot be saved.
Simplified Scenario: One Field
Suppose you have a field called First Field that you don't necessarily need to be filled out right away, and you also have a choice field called Status Field that's used to indicate whether an item is a draft version or is submitted (displaying either "Draft" or "Submitted").
You can set up a list validation formula that requires First Field to be filled in whenever the Status Field is changed to "Submitted".
The formula would look like this:
=If([Status Field]="Submitted",NOT(ISBLANK([First Field])),TRUE)
In plain English, that formula is saying:
If Status Field is equal to Submitted...
...Then the form is valid only if First Field is not blank.
Otherwise, the form is valid.
More Complex Scenario: Multiple Fields
To make that work for multiple fields, you can join conditions together using the OR() and AND() functions, in the format of OR(condtion1,condition2)
So instead of ISBLANK([First Field]) to check whether a field is blank, you'd have something like OR(ISBLANK([First Field]),ISBLANK([SecondField])) to check whether either of two fields is blank. (Replacing First Field and Second Field with your field titles as appropriate.
The formula would now look like this:
=If([Status Field]="Submitted",NOT( OR(ISBLANK([First Field]),ISBLANK([Second Field]))),TRUE)
Note that you can nest multiple OR() conditions together arbitrarily, in the format of OR(condition1, OR(condition2, OR(condition3, condition4))) (and so on indefinitely).
Offloading Formula Complexity to Calculated Columns
If you run into limits with the formula length, you can offload some of your condition calculations into their own calculated columns, then just refer to those column values from your validation formula.
This can also help keep your formula from looking so complex.
For example, for every field that you want to be required, you can create a calculated column with a formula of =NOT(ISBLANK([Column Name])) and name it something like "{Column Name} Is Valid". Then you can refer to those columns in your validation formula:
=If([Status Field]="Submitted",AND([Field1 Is Valid],AND([Field2 Is Valid],[Field3 Is Valid])),TRUE)
I have a spreadsheet which is filled automatically from data in Microsoft Sharepoint. Unfortunately this data fills my location column as follows: IND;# ENG ;# USA if for example that particular input has 3 locations.
I then have drop down boxes (made via data validation) to filter the results down and give an optimum result. However when it comes to choosing location i can either choose ALL, IND, ENG, USA OR IND;# ENG ;# USA. If I chose, for instance, IND, then the options that are in multiple locations will not be returned (only the options that are in only IND will).
I was just wondering if there is any way, avoiding VBA, which will enable a choice of the individual location to return all options in this location, including the options that are availible in multiple locations.
** Please note that these multiple locations are contained within the SAME cell.
It's not possible as you have the question written. A drop down list created by data validation can only display a single result. If you chose 'IND' and wanted to show results for say 'IND' and 'IND, ENG' you would need to use something other than a drop down list or you need to do additional filtering based on the value selected down stream in your code/logic.
I'd say your best bet is to use VBA. This can be transparent from the user. When a user selects a value in the drop down list, vba can sort and filter the remaining drop down list based on what was selected (aka dependent drop downs)