How do I accept user inputs or page context to populate a widget's data service parameters?

I have a data service with parameters, but I can't figure out how to use it in a widget so that it doesn't just always use the default parameters.

For example, is there a way to allow the user to input the value for "accountid" or for "accountid" to be automatically set to the customer number when viewing a particular customer record, that way the widget shows something besides the default data service values?

  • Hey there - normally I do this by sending a context message from another widget. I would create a widget that has a list of customers, once the user selects an item from the customer list, the second widget can receive that message and can filter by customer number. You could also create a forms widget that has a list of customers in the dropdown. Then when you select a customer from the drop down, the fields below will automatically update based on the selected widget. 

  • Ah, I see, thanks!

    Is there any way to receive a context message from an existing widget like Customer Lookup? I don't see a way of making my own widget that would be able to load all active customers into a list or form dropdown without running into limits.