Skip to main content

Notifications

Dynamics 365 Community / Forums / Sales forum / Use of "SEARCH RO...
Sales forum
Answered

Use of "SEARCH ROWS"

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
    Abdul Wahab 12,070 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
    Abdul Wahab 12,070 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
    DiePic 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
    DiePic 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
    Bipin D365 28,962 Moderator on at
    RE: Use of "SEARCH ROWS"

    Hi,

    Use List Rows action

    saralagerquist.com/.../

  • DiePic Profile Picture
    DiePic 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
    Abdul Wahab 12,070 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
    Abdul Wahab 12,070 Moderator on at
    RE: Use of "SEARCH ROWS"

    Hi DIE PIC

    You are missing round brackets. I guess

    pastedimage1669283764548v1.png

  • DiePic Profile Picture
    DiePic 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
    Abdul Wahab 12,070 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

Helpful resources

Quick Links

Dynamics 365 Community Update

Welcome to the inaugural Community Platform Update. As part of our commitment to…

Dynamics 365 Community Newsletter - August 2024

Catch up on the latest D365 Community news

Community Spotlight of the Month

Kudos to Mohana Yadav!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,142 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 227,979 Super User 2024 Season 2

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans