<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to perform a query search with Dropbox API 2? in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-perform-a-query-search-with-Dropbox-API-2/m-p/758561#M33147</link>
    <description>&lt;P&gt;Thank you for clarifying, the situation!&lt;/P&gt;</description>
    <pubDate>Tue, 19 Mar 2024 23:26:27 GMT</pubDate>
    <dc:creator>cristpol95</dc:creator>
    <dc:date>2024-03-19T23:26:27Z</dc:date>
    <item>
      <title>How to perform a query search with Dropbox API 2?</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-perform-a-query-search-with-Dropbox-API-2/m-p/758222#M33141</link>
      <description>&lt;P&gt;Hey guys, I am creating a "login" system, which is not really a login system, but an environment for the students to access their files in their own respective folder and avoid manipulation of the same files from other students.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to create a "failsafe" where is the student is not found within the dropbox environment, then the program takes the first letter of the first name of the student and the first name of the last name of the student, then it proceeds to search all the students that have those initials in their first name and last name.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Once it finds those folders, then it shows all of the students and then the student is able to select which account is theirs; otherwise we manually create a folder for the student.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the code that performs the query search:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;private async Task&amp;lt;List&amp;lt;string&amp;gt;&amp;gt; SearchStudentNames(DropboxClient dropbox, string firstName, string lastName)&lt;BR /&gt;{&lt;BR /&gt;var similarNames = new List&amp;lt;string&amp;gt;();&lt;/P&gt;&lt;P&gt;try&lt;BR /&gt;{&lt;BR /&gt;// Construct the query&lt;BR /&gt;var query = $"{firstName.ToLower().First()}*.{lastName.ToLower().First()}*";&lt;/P&gt;&lt;P&gt;// Perform the search&lt;BR /&gt;var searchResult = await dropbox.Files.SearchV2Async(query);&lt;/P&gt;&lt;P&gt;Debug.WriteLine(searchResult.Matches.Count);&lt;/P&gt;&lt;P&gt;// Extract folder names from the search result&lt;BR /&gt;foreach (var match in searchResult.Matches)&lt;BR /&gt;{&lt;BR /&gt;Debug.WriteLine("1" + match);&lt;/P&gt;&lt;P&gt;// Check if the matched item represents a folder&lt;BR /&gt;if (match.Metadata.AsMetadata.Value.IsFolder)&lt;BR /&gt;{&lt;BR /&gt;// Extract the folder name and add it to the list&lt;BR /&gt;similarNames.Add(match.Metadata.AsMetadata.Value.Name);&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;catch (Exception ex)&lt;BR /&gt;{&lt;BR /&gt;// Handle exception, e.g., Dropbox API error&lt;BR /&gt;// Log the exception or return an empty list in case of failure&lt;BR /&gt;Debug.WriteLine("2" + ex.Message);&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;return similarNames;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, this code does not work, it returns 0. I just started using SearchAsyncV2, so I need help with understanding what I am missing here.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks everyone for your help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Mar 2024 22:06:48 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-perform-a-query-search-with-Dropbox-API-2/m-p/758222#M33141</guid>
      <dc:creator>cristpol95</dc:creator>
      <dc:date>2024-03-18T22:06:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to perform a query search with Dropbox API 2?</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-perform-a-query-search-with-Dropbox-API-2/m-p/758250#M33142</link>
      <description>&lt;P&gt;Hi &lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1814607"&gt;@cristpol95&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;It's easy, just don't assume the method you're using works with regular expressions (unfortunately).&amp;nbsp;🤷 Where did you read this? 🧐 In general it's good idea not to assume anything if not explicitly written somewhere. &lt;img class="lia-deferred-image lia-image-emoji" src="https://www.dropboxforum.com/html/@41457EF40051AFF130FDBFE21B496926/emoticons/1f609.png" alt=":winking_face:" title=":winking_face:" /&gt; In your situation you're looking for file or folder named exactly as your query string or the query string is part either of the file/folder name or file content. Is there such thing? That's why you got empty list (not 0 by the way). There is no way to turn search to regular expression mode - it's unsupported. Let's hope such support will be added at some point.&lt;/P&gt;&lt;P&gt;Hope this clarifies matter.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Mar 2024 00:15:31 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-perform-a-query-search-with-Dropbox-API-2/m-p/758250#M33142</guid>
      <dc:creator>Здравко</dc:creator>
      <dc:date>2024-03-19T00:15:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to perform a query search with Dropbox API 2?</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-perform-a-query-search-with-Dropbox-API-2/m-p/758334#M33144</link>
      <description>But are you not able to perform a folder search just how you can find a file in Windows lets say, where I specify a path and what I want to search?</description>
      <pubDate>Tue, 19 Mar 2024 09:58:37 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-perform-a-query-search-with-Dropbox-API-2/m-p/758334#M33144</guid>
      <dc:creator>cristpol95</dc:creator>
      <dc:date>2024-03-19T09:58:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to perform a query search with Dropbox API 2?</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-perform-a-query-search-with-Dropbox-API-2/m-p/758369#M33145</link>
      <description>&lt;P&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1814607"&gt;@cristpol95&lt;/a&gt;&amp;nbsp;Здравко is correct; the Dropbox API search functionality does not support regex or wildcard functionality, but I'll pass this along as a feature request. I can't promise if or when that might be implemented though.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Mar 2024 13:29:10 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-perform-a-query-search-with-Dropbox-API-2/m-p/758369#M33145</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2024-03-19T13:29:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to perform a query search with Dropbox API 2?</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-perform-a-query-search-with-Dropbox-API-2/m-p/758560#M33146</link>
      <description>&lt;P&gt;I just thought you would be able to use wildcards to search for anything past a certain letter by using the asterisk.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I appreciate your response. Thank you!&lt;/P&gt;</description>
      <pubDate>Tue, 19 Mar 2024 23:26:01 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-perform-a-query-search-with-Dropbox-API-2/m-p/758560#M33146</guid>
      <dc:creator>cristpol95</dc:creator>
      <dc:date>2024-03-19T23:26:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to perform a query search with Dropbox API 2?</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-perform-a-query-search-with-Dropbox-API-2/m-p/758561#M33147</link>
      <description>&lt;P&gt;Thank you for clarifying, the situation!&lt;/P&gt;</description>
      <pubDate>Tue, 19 Mar 2024 23:26:27 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-to-perform-a-query-search-with-Dropbox-API-2/m-p/758561#M33147</guid>
      <dc:creator>cristpol95</dc:creator>
      <dc:date>2024-03-19T23:26:27Z</dc:date>
    </item>
  </channel>
</rss>

