Predictive search
Hello, I'm simulating auto-complete results on a global search. My goal is to try to simulate the spotlight desktop application on a Mac - i.e. using datamasters containing different content types (users, computers, contacts etc). To achieve this, I've created four separate data masters - and displayed them below the input field. On key up, I've set the value of each data master using the conditions shown in the screenshot (as per the tutorial). What I'd like to do is once a data master set (i.e. users) contains no results, hide that data master and push up the other data masters which do contain results. Is this possible? The global search is a master entitled Masthead - option 3 in the attached file.
Yes that should be possible. Select all of the Data Lists, right-click and select 'Group in Dynamic Panel'. With the Dynamic Panel still selected, go to the Properties palette and find the 'Layout' section. Change the layout to 'Vertical' and add a bit of vertical spacing. With this layout, the Data Lists stack one above the other and will automatically move up if one is hidden.
Now you can add a condition to the filter event that should look something like the image below, with the Data Master, attributes, and Input field replaced to correspond to the information in your prototype. This condition first checks to see if the filter would return any results before it actually filters the Data List. You can then create an "Else" event that will hide the Data List. Since all the Data Lists are in a vertical layout dynamic panel, they should all shift up if one is hidden.
Hope this helps, and let me know if you have any questions!
Yes that should be possible. Select all of the Data Lists, right-click and select 'Group in Dynamic Panel'. With the Dynamic Panel still selected, go to the Properties palette and find the 'Layout' section. Change the layout to 'Vertical' and add a bit of vertical spacing. With this layout, the Data Lists stack one above the other and will automatically move up if one is hidden.
Now you can add a condition to the filter event that should look something like the image below, with the Data Master, attributes, and Input field replaced to correspond to the information in your prototype. This condition first checks to see if the filter would return any results before it actually filters the Data List. You can then create an "Else" event that will hide the Data List. Since all the Data Lists are in a vertical layout dynamic panel, they should all shift up if one is hidden.
Hope this helps, and let me know if you have any questions!
Hi Danielle! Thank you so much for your response. The vertical layout worked brilliantly. What I'm struggling with is how to create the condition - should it be four separate on key up events - and four separate conditions - as there are four separate data masters in the dynamic panel? Or should it be one long key up event to filter all four data masters (as I originally created it) and one long condition? And should this hide both the header row and current row within each data master? Hope this makes sense.....
Hi Danielle! Thank you so much for your response. The vertical layout worked brilliantly. What I'm struggling with is how to create the condition - should it be four separate on key up events - and four separate conditions - as there are four separate data masters in the dynamic panel? Or should it be one long key up event to filter all four data masters (as I originally created it) and one long condition? And should this hide both the header row and current row within each data master? Hope this makes sense.....
This is how it displays (without the condition and else event)
This is how it displays (without the condition and else event)
The events you created look like they should work perfectly! You can hide the entire Data List for each interaction, so you'll only see the Data Lists that return any results after filtering.
The events you created look like they should work perfectly! You can hide the entire Data List for each interaction, so you'll only see the Data Lists that return any results after filtering.
Thanks Danielle, sorry to be a huge pest but I still can't get the header rows to hide (even though I've selected the entire data master - see screenshots).
Thanks Danielle, sorry to be a huge pest but I still can't get the header rows to hide (even though I've selected the entire data master - see screenshots).
I think I see the issue - it looks like the condition is slightly incorrect, so the Hide event isn't triggering. The end of each condition should be ≥ 1, not ≠ 1.
I think I see the issue - it looks like the condition is slightly incorrect, so the Hide event isn't triggering. The end of each condition should be ≥ 1, not ≠ 1.
OK thanks Danielle I'll try this...
OK thanks Danielle I'll try this...
Replies have been locked on this page!