web
You’re offline. This is a read only version of the page.
close
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.

I have the same question (0)
  • Suggested answer
    Abdul Wahab Profile Picture
    12,119 Moderator on at

    Hi DIE PIC,

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

    pastedimage1669280037027v1.png

  • DiePic Profile Picture
    448 on at

    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,119 Moderator on at

    Hi DIE PIC

    You are missing round brackets. I guess

    pastedimage1669283764548v1.png

  • Suggested answer
    Abdul Wahab Profile Picture
    12,119 Moderator on at

    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

  • DiePic Profile Picture
    448 on at

    Hi Abdul Wahab  

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

  • Suggested answer
    Bipin D365 Profile Picture
    28,983 Moderator on at

    Hi,

    Use List Rows action

    saralagerquist.com/.../

  • DiePic Profile Picture
    448 on at

    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?

  • DiePic Profile Picture
    448 on at

    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?

  • Verified answer
    Abdul Wahab Profile Picture
    12,119 Moderator on at

    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

  • Suggested answer
    Abdul Wahab Profile Picture
    12,119 Moderator on at

    Hi DIE PIC

    You need to download Fetch XML with similar properties

    pastedimage1669288531541v2.png

    pastedimage1669288631698v4.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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 74 Super User 2025 Season 2

#2
Daniyal Khaleel Profile Picture

Daniyal Khaleel 32 Most Valuable Professional

#3
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 31 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans