web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / how to use Pac org fetch
Power Apps
Answered

how to use Pac org fetch

(0) ShareShare
ReportReport
Posted on by 28

I am using `pac org fetch` to get the the solution version. however i am not sure how to serialise the result. here is the code below,

 

 

$fetchXml = "<fetch><entity name='solution'><attribute name='uniquename'/><attribute name='version'/><filter><condition attribute='uniquename' operator='eq' value='$($solutionName)'/></filter></entity></fetch>"

$fetchResult = pac org fetch -x $fetchXml

 

(attach image)

It is working as it supposed to and result comes up like this,

how can i get the value 1.0.0.4 (a value of a field) from the response (ie `$fetchResult`)

fetch result.png
I have the same question (0)
  • Verified answer
    v-xiaochen-msft Profile Picture
    on at

    Hi @Codebug ,

     

    Please try this

    $tempCount=( $fetchResult[$fetchResult.count-2] -split ' ')[(( $fetchResult[$fetchResult.count-2] -split ' ')).count-2]

     

    Best Regards,

    Wearsky

  • Codebug Profile Picture
    28 on at

    @v-xiaochen-msft , thanks very much. worked like a charm.

     

    Although, if i may, it feels like a hack. if MS changes the output string like removing just one dot(.) from the string "Connected to..." - this will stop working. i was hoping there might exist a formatting strategy where these values become key value pairs. i checked and i could not find any.

     

    really appreciate the response. thanks again.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
Kalathiya Profile Picture

Kalathiya 372 Super User 2026 Season 1

#2
WarrenBelz Profile Picture

WarrenBelz 303 Most Valuable Professional

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 238 Super User 2026 Season 1

Last 30 days Overall leaderboard