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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / power app function is ...
Power Apps
Suggested Answer

power app function is not working after publish but work in power app studio

(0) ShareShare
ReportReport
Posted on by
I am using below formula in power app timer On End, 
 
Refresh(OPSBOM_Triger_flow);
Set(parsedTrigerIDOpsNum, Value(VarcreatedIDRM));
Set(triggerStatus,LookUp(OPSBOM_Triger_flow,ID=VarcreatedIDRM).Status);
If(triggerStatus="Completed",
Set(VarAutomationRM,false);
Set(JsonString,Get_From_JSON.Run(VarcreatedIDRM).json_output);
Set(jsonparse,ParseJSON(JsonString));
ClearCollect(collection_temp,ForAll(jsonparse,
 {          Style: Trim(ThisRecord.PMPRNO),
            BOM_Version: Text(ThisRecord.PMSTRT),
            BOM_Coment: ThisRecord.PHPRTX,
            Mat_Sequance: ThisRecord.PMMSEQ,
            Parent_Item: ThisRecord.PMMTNO,
            Item_Description: ThisRecord.MTNO_DESC,
            Operation: Value(ThisRecord.PMDWPO),
            Color_Option: ThisRecord.COLOR_OPTION,
            Color_Name: Trim(ThisRecord.PFTX15),
            ID: ""
        }
        ));,
Set(VarAutomationRM,true));
 
Power automate giving the output to power app, but "parsedTrigerIDOpsNum" (Set(parsedTrigerIDOpsNum, Value(VarcreatedIDRM));) is not creating after publish,
Categories:
I have the same question (0)
  • Suggested answer
    WarrenBelz Profile Picture
    155,838 Most Valuable Professional on at
    I have parsed this out so it is easier for me to read
    Refresh(OPSBOM_Triger_flow);
    Set(
       parsedTrigerIDOpsNum, 
       Value(VarcreatedIDRM)
    );
    Set(
       triggerStatus,
       LookUp(
          OPSBOM_Triger_flow,
          ID = VarcreatedIDRM
       ).Status
    );
    If(
       triggerStatus = "Completed",
       Set(
          VarAutomationRM,
          false
       );
       Set(
          JsonString,
          Get_From_JSON.Run(
          VarcreatedIDRM).json_output
       );
       Set(
          jsonparse,
          ParseJSON(JsonString)
       );
       ClearCollect(
          collection_temp,
          ForAll(
             jsonparse,
             {
                Style: Trim(ThisRecord.PMPRNO),
                BOM_Version: Text(ThisRecord.PMSTRT),
                BOM_Coment: ThisRecord.PHPRTX,
                Mat_Sequance: ThisRecord.PMMSEQ,
                Parent_Item: ThisRecord.PMMTNO,
                Item_Description: ThisRecord.MTNO_DESC,
                Operation: Value(ThisRecord.PMDWPO),
                Color_Option: ThisRecord.COLOR_OPTION,
                Color_Name: Trim(ThisRecord.PFTX15),
                ID: ""
             }
          )
       );,
       Set(
          VarAutomationRM,
          true
       )
    );
    From what I can see (and bear in mind I cannot see your data), the core of this structure is the Variable VarcreatedIDRM, which is not defined in the code you have posted. This appears to be a numeric value representing the ID of the record in OPSBOM_Triger_flow (I assume your data source), where you check if the Status field in that record has the value Completed and set the Variable VarAutomationRM accordingly. The rest of the code relies on the Variable VarcreatedIDRM, so is not reliant on parsedTrigerIDOpsNum.
     
    So my first question is whether the Variable parsedTrigerIDOpsNum is a number and if so why are you using Value() around it. This may not be the answer however as logic suggests that if the Flow runs using VarcreatedIDRM (or values derived from it), then parsedTrigerIDOpsNum should set using the same valid value.
     
    Please ✅ Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider answering Yes to Was this reply helpful? or give it a Like ♥
    Visit my blog
    Practical Power Apps    LinkedIn  
     
     
  • RO-19010924-0 Profile Picture
    on at
     
    I'm getting VarcreatedIDRM as a output of another power automate flow (respond to power apps) I'm getting as JSON so i hope that is getting to power app as a text that's why i tried to convert in to number using Value().
  • WarrenBelz Profile Picture
    155,838 Most Valuable Professional on at
    I did not get a notification on your post (you did not tag me) - only saw it now.
     
    From what you appear to be saying the only issue is here
    Set(
       parsedTrigerIDOpsNum, 
       Value(VarcreatedIDRM)
    );
    So my next question (which I referred to before) is how you create VarcreatedIDRM and what you see it it (put a label on the screen) after it is created.

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 424

#2
WarrenBelz Profile Picture

WarrenBelz 355 Most Valuable Professional

#3
11manish Profile Picture

11manish 290

Last 30 days Overall leaderboard