Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Answered

Use of "SEARCH ROWS"

(0) ShareShare
ReportReport
Posted on by 448

Hi all

I need to retrive a specific row from a table to continue my flow.

In my table "cr07a_athdocopp" connected with table "opportunity" (column "cr07a_titoloopportunita"), as in picture, I need to find if exist a row with column "cr07a_categoriaopportunitaname = Conferma Ordine Cliente" .

pastedimage1669278002793v1.png

I try in this way 

pastedimage1669278375356v4.png

but result is always an error.

pastedimage1669278916478v1.png

Somebody can help me to understand where I'm mistaken?

thanks in advance.

  • Suggested answer
    Abdul Wahab Profile Picture
    12,085 Moderator on at
    RE: Use of "SEARCH ROWS"

    Hi DIE PIC

    You need to download Fetch XML with similar properties

    pastedimage1669288531541v2.png

    pastedimage1669288631698v4.png

  • Verified answer
    Abdul Wahab Profile Picture
    12,085 Moderator on at
    RE: Use of "SEARCH ROWS"

    Hi DIE PIC,

    Download the XRM Toolbox and use fetch XML Builder... or Make use Fetch XMLs as defined in my lat rply

    In the control condition. Use "length(outputs('nameOfListRowsComponents')?['body/value'])" with greater than 0

    pastedimage1669287923653v1.png

  • DiePic Profile Picture
    448 on at
    RE: Use of "SEARCH ROWS"

    Hi Abdul Wahab 

    I'm not much time that I work with Dynamics, and there are a lot of thinghs that I dont know.

    How can I find and use "Fetch XML Builder"?

    In this case I've written the query and the problem is that I put the value and not the ID of the value.


    <fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false">
       <entity name="cr07a_athdocopp">
          <attribute name="cr07a_titoloopportunita"/>
          <attribute name="cr07a_categoriaopportunita"/>
          <attribute name="cr07a_categoriaopportunitaname"/>
             <filter type="and" >
             <condition attribute="cr07a_titoloopportunita" operator="eq" value="@{variables('strIdOpportunity')}"/>
             <condition attribute:"cr07a_categoriaopportunitaname" operator="eq" value="Conferma Ordine Cliente"/>
             </filter>
       </entity>
    </fetch>

    if I change the value with ID_value (50c56d74-f634-ed11-9db1-0022489dd6df), the flow work. But I will find the row with value and not with ID_value if it's possibile.

    Another problem is how can I count how many row find the flow? with "Search Rows" at the end I've a number, how can I obtain this number in this way?

  • DiePic Profile Picture
    448 on at
    RE: Use of "SEARCH ROWS"

    Hi Bipin Kumar 

    With "List Rows" and "Filter Rows", I've obtained a result, but now I've 2 problems:

    1 - I need to search column "_cr07a_categoriaopportunita_value" not by ID but by name ("Conferma Ordine Cliente") ... there is a way?

    pastedimage1669286085784v1.png

    2 - with "Search Rows" I've a result of rows find, with "List Rows" no ... how can I recognize when if the flow find a row or not? There is a way to count the row finded from the flow?
    Can make me an example pls?

  • Suggested answer
    Bipin D365 Profile Picture
    28,977 Moderator on at
    RE: Use of "SEARCH ROWS"

    Hi,

    Use List Rows action

    saralagerquist.com/.../

  • DiePic Profile Picture
    448 on at
    RE: Use of "SEARCH ROWS"

    Hi Abdul Wahab  

    But I must work with "Fetch XML" or on "List Rows"?

  • Suggested answer
    Abdul Wahab Profile Picture
    12,085 Moderator on at
    RE: Use of "SEARCH ROWS"

    Hi DIE PIC,

    Did you download a query from the model-driven app? or Fetch XML Builder

    pastedimage1669284029730v1.png

    or Is it created by you?

    pastedimage1669284187655v2.png

  • Suggested answer
    Abdul Wahab Profile Picture
    12,085 Moderator on at
    RE: Use of "SEARCH ROWS"

    Hi DIE PIC

    You are missing round brackets. I guess

    pastedimage1669283764548v1.png

  • DiePic Profile Picture
    448 on at
    RE: Use of "SEARCH ROWS"

    Hi Abdul Wahab 

    thanks for your reply. 

    I try as you suggest, in this way

    pastedimage1669282432035v1.png

    but return me this error

    pastedimage1669282734558v2.png

    pastedimage1669282746611v3.png

    I need to retrive "YES" if there is a row with 
    "cr07a_categoriaopportunitaname" eq "Conferma Ordine Cliente"

  • Suggested answer
    Abdul Wahab Profile Picture
    12,085 Moderator on at
    RE: Use of "SEARCH ROWS"

    Hi DIE PIC,

    The easiest way to add a filter in a search row is Fetch XML inlist rows

    pastedimage1669280037027v1.png

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Jonas ”Jones” Melgaard – Community Spotlight

We are honored to recognize Jonas "Jones" Melgaard as our April 2025…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 294,145 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 232,917 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans