I've just started using the new NWC forms data sources / data lookup functionality - which is great to see this functionality added.
I have a data source configured to a SharePoint Online List containing interest rates and durations.
I want to be able to select the relevant duration from the drop down and based on that populate the interest rate from the SharePoint Online List into another field.
The only way I could work out how to do this was by adding two data lookup form controls, however this isn't working as I though it might...
I have one data lookup form control for duration and one for the interest rate.
I've configured a condition on the interest rate form control based on the duration form control and limited the maximum number of rows to return to 1.
However, when I select the duration from the first drop down, although there is a one to one relationship between the duration and the interest rate in my SharePoint Online List, the interest rate drop down still forces the user to select it. I was hoping the way it would work is that once they select a duration, the corresponding interest rate would just display in the form control without having to then click on the drop down and select the value and I'd make the field read only.
Not sure if this is just how the data sources / data lookup functionality works or if I have missed something and could achieve this a better way.
Any feedback will be greatly appreciated. Thanks!
Solved! Go to Solution.
@tlangford while you can do cascading lookups (as you've found), there is currently no functionality that will "auto-populate" the default value of the second control based on the first control. Best workaround for this would be making the second control required so as to not miss any data entry.
We can also put together a feature enhancement request for the Data Lookup control, but I want to make sure that I've got a good understanding of desired functionality so I do have a couple questions:
Would love to get your thoughts.
Thanks for the feedback.
Ideally, what I'd like to be able to do (and from what I have seen from other competitor eforms solutions), in the scenario I presented, for the second form control (which would be dependant on the first data source form control), is the ability to use a number or text form control or a drop-down form control.
For the numeric or text form control, I'd like to see this return only a single value based on the selection from the first data source form control.
For the drop-down form control, I'd like to see this return multiple values based on the selection from the first data source form control and these would be displayed as values in the drop-down to be able to select from. So it would be great for this functinoality to be intuitive enough based on the type of form control used in conjunction with the data source.
Perhaps the conditions currently available in the data source form control could be moved out to a separate tab altogether in the forms designer along side the rules tab - perhaps called seomthing like "lookup rules"?
@tlangford awesome! Super appreciate that feedback.
We have been thinking about how to make rules easier within form controls, so I'll definitely pass this along to our forms product team and see if we can add it along with some of the other ideas we have been kicking around.
At the moment the data lookup control in primarily used for a choice control at the moment. We are looking to expand this functionality whereby you will be able to query for a whole object and use parts of that object as you described.
However, there may be a way to get what youre after if I understand your requirements correctly. I have created a video on how I would solve this - hope this is helpful to you.
Thank you for taking the time to explain that functinalty - what you've demonstrated there is exactly what I need to achieve!
Glad you found that useful. We are currently working on returning a data query as an object, which will make this a lot more powerful in the future, but hopefully, the example below will keep you going until we get this out.
When can we expect to populate several controls via a lookup ?
For the moment, we have to maintain a concatenated value in the SharePoint list, which is a shame.
I would love to be able to populate several labels depending on the last dropdown of a cascading.