Reply
Level 8
Posts: 102
Registered: ‎04-30-2018

User Added Items Added to Search

[ Edited ]

What are some ideas for this scenario? 

 

  • User adds comma separated "tags" to Textbox
  • Values are added to a Collection via something like: 

 

ClearCollect(tags,
    Split(Textbox.Text,","))
  • User clicks "Submit" button
  • Somehow the Collection "tags" is Patched to a field in an Azure table
  • Next time user visits app, all tags (suggestions) from the Azure table are shown AS THE USER TYPES
    • Similar to the "Search" when creating a new messege in this forum
  • When user types a comma, the tag suggestions disappear until typing of next tag. This repeats until user enters last tag and clicks "Submit" button again. 
  • User can click one of the tags displayed to add it to the Textbox

The goal here is to crowd source tags (similar to how the forum software HERE does it), get consistent tags for word-clouds, etc. 

 

I dont' know: 

  1. What the data source would be set to for Textbox (somehow all the tags previously submitted would need to be de-duplicated and added to a Collection OnStart)
  2. How to Patch a Collection to a single Azure field (i have the db setup, just haven't tried this type of Patch yet)
  3. How to search and match tags in real time, based on what the user is typing (I wonder if this is even possible in PA!)

 

 

 

 

Highlighted
Community Support Team
Posts: 4,606
Registered: ‎09-20-2016

Re: User Added Items Added to Search

1.If you only want to add Distinct value, then the clearcollect function should be:

ClearCollect(tags,Distinct(Split(TextInput1.Text,","),Result))

2. To store the data into Azure table single field, try:

forall(tags, patch(AzureTable, defaults(AzureTable),{FieldName:Result}))

3. To search with the existing one, you could consider take use of Combo Box control.

 

Currently PowerApps control don't support "fill-in choices", so the tag experiences can't be fully supported with PowerApps, based on what I know.

 

Regards,

Michael