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 / Run Status Flow Toggle...
Power Apps
Unanswered

Run Status Flow Toggle Question

(0) ShareShare
ReportReport
Posted on by

@WarrenBelz 

 

Hello Warren,

 

I have a follow-up question for you to the Status/Percent Complete issue you helped me resolve today. I have a Status toggle in my form that helps determine when a flow runs that informs stakeholders of a status change. It is set to default to "No" in the SharePoint list. It should only change to "Yes" when the record is updated to a different status.

2023-06-18_09-32-16.png

 

The Default property of the toggle is:

 

If(varRecord.Status.Value <> cbStatusES.Selected.Value, true, false)

 

 

If I hover over the first part of the formula, it displays the correct existing status.

varStatus.png

 

If I hover over the second part of the formula, it is more ambiguous so the toggle trigger no longer triggers the flow.

cbStatusValue.png

 

The Items property of the Status combobox is. 

 

Distinct(colChoices,Value)

 

Distinct.png

 

What adjustment do I need to make, to make this work? I have attached the Collection that is established in the OnVisible property of the screen. Let me know if you need any additional information. Thank you! Teresa

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    153,040 Most Valuable Professional on at

    Hi @tagustin2020 ,

    Firstly, you only need in the Default

    varRecord.Status.Value <> cbStatusES.Selected.Value

    however what is the DefaultSelectedItems of cbStatusES ? Also, if you put this on a Label

    cbStatusES.Selected.Value

    do you see the correct value ?

     

  • tagustin2020 Profile Picture
    on at

    @WarrenBelz 

     

    Hello Warren,

     

    Thank you for the simplified formula suggestion. I should have caught that. Here are the Default and DefaultSelecteditems properties for the Status combobox.

     

    DSI.png

    I inserted a label on the screen and set the Text property to cbStatusES.Selected.Value. It reads [object Object].

     

    As I continue testing the app, I noticed that the color-coded status label isn't working correctly. It should state the previous status when the form is in Edit mode. This will likely resolve itself along with the toggle value once we get this worked out, but I thought I would let you know. 

     

    The Text formula for the colored bar is:

     

    If(varRecord.Status.Value = cbStatusES.Selected.Value, "Status: " & varRecord.Status.Value, "Previous Status: " & varRecord.Status.Value)

     

     

    More importantly, the Percent Complete options aren't showing up in the Percent Complete combobox when I choose a different status from the Status combobox. This happens whether I have the OnChange of the Status ComboBox set to false or to Reset(cbPercentCompleteES).

     

    PercentComplete.png

     

    I've attached the formulas for the OnVisible Collection and the Status and Percent Complete data cards. Let me know if there is anything else you need to troubleshoot this. Do you think this Collection method can be easily fixed or do we need to revisit the supporting Status SharePoint list I created that had the two single line of text columns to feed the Status and Percent Complete comboboxes in a cascading method?

     

    Kind regards,

    Teresa

  • WarrenBelz Profile Picture
    153,040 Most Valuable Professional on at

     

    Hi @tagustin2020 ,

    The core of the issue is in this value

    cbStatusES.Selected.Value

    as it seems to be a Table - do you have the multiple select turned on (when it should not be)?

     

  • tagustin2020 Profile Picture
    on at

    @WarrenBelz 

     

    Hello Warren, 

     

    Multiple selections are turned off for both comboboxes. 

     

    Teresa

  • WarrenBelz Profile Picture
    153,040 Most Valuable Professional on at

    Hi  @tagustin2020 

    If a single selection, then 

    cbStatusES.Selected.Value

    should produce the text value that is selected (not [object Object] - which suggests a Table). You can also delete the Default of the Combo Boxes and leave DefaultSelectedItems.

    So the next question is what type of field is Status ?

  • tagustin2020 Profile Picture
    on at

    @WarrenBelz 

     

    Hello,

     

    The Status column is a Choice column.

     

    Teresa

  • Verified answer
    WarrenBelz Profile Picture
    153,040 Most Valuable Professional on at

    Hi @tagustin2020 ,

    Try in the DefaultSelectedItems either

    {Value: ThisItem.Status.Value}

    or simply

    ThisItem.Status

    You are currently putting a table inside and existing Table (so going another level deep).

     

  • tagustin2020 Profile Picture
    on at

    @WarrenBelz 

     

    Thank you, Warren. That worked. I appreciate your help!

     

    Teresa

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…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard