Sep 06 2019 10:04 AM
Hello, we would like to create calculation that can offer different choices based on another column value.
Example:
We have a choice column called “Object” and the user can able to select the following values:
Then we have a calculated choice column called “Object Type” that should offer options based on the selection value in “Object” column.
If “Object” = ‘Books’ then, "Object Type" choice options needs to be:
If “Object” = ‘Gadgets’ then, "Object Type" options needs to be:
Would this be possible to do? We tried adding a choice column in a Document Library but we weren't able to click the selection unless we enter Quick Edit mode.
Sep 06 2019 03:19 PM - edited Sep 06 2019 03:19 PM
@Mark182 this will not be possible if you want to apply in modern page. The cascading look up/drop down column will be possible if you use the classic view as you can add a script for the same. The out put will be something similar:
For the same please let me know if you need steps I can provide.
Sep 06 2019 08:03 PM
Sep 07 2019 09:53 AM
@Vikram_Samal Thank you very much! This is greatly appreciated though we are already using the modern page frequently, can you provide the steps to do this in classic?
Sep 07 2019 09:53 AM
Sep 09 2019 10:02 AM
Create one Country List in which we are storing our Country values in Title field.
We have another list named States, in which we are storing state values in Title field. This list also has a lookup field named Country in which we are storing corresponding countries from Country List.
States List with Country as Lookup field. Now we have third list named Information in which there are two lookup fields: Country and State
Just add below script in Content editor webpart on NewItem and EditItem page.
<script src="//code.jquery.com/jquery-1.10.1.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$().SPServices.SPCascadeDropdowns({
relationshipList: "States",
relationshipListParentColumn: "Country",
relationshipListChildColumn: "Title",
parentColumn: "Country",
childColumn: "State",
debug: true
})
})
</script>
Please let me know if this helps.