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 / Labels are not updatin...
Power Apps
Unanswered

Labels are not updating and conditional formatting is not triggering on copy form. How do I fix?

(0) ShareShare
ReportReport
Posted on by 831 Moderator

I posted this question before, but I haven't gotten any feedback since. Here is what I have.

 

  • I have a form that uses combo boxes with this I have corresponding labels
  • The labels populate when a value is selected int he combo box
  • For some labels I was able to use comboboxname.Selected.Value and for others I needed to use comboboxname.Selected.columnname
  • The labels use conditional formatting. They are pink if the datacard is required and there is no value selected in the combobox. Code looks like this: 

 

 

If(IsBlank(CB_Industry.Selected.'Industry Name') && DC_Industry.Required = true, RGBA(253, 222, 207, 1), RGBA(255,255,255,1))​

 

 

This all works great when using the form to create a new record. Where I run into issues is when I go copy a record. Here is what this process looks like:

  • User clicks on a record in a gallery and then clicks a copy button
  • The button adds the record to a global variable and redirects them back to the original form where the forms is populated with the data in the global variable. 
  • Code on the copy button looks like this" 

 

 

Set(
 glbFormData,
 GAL_Campaigns.Selected
);
Set(
 varCopy,
 true
);
EditForm(FRM_CampaignForm);
Navigate('Create Campaign');​

 

 

Note: I don't believe I need that varCopy variable. It was copied over from another app that has different functionality and required it.

Back on the form the fields are populated. Here is where my problem comes in. The labels, when it comes to comboboxes, don't function as expected. 

  • If a label is using comboboxname.Selected.Value for the text value data is populated in that label
  • If a label is using comboboxname.Selected.columnname then no value is populated in that label
  • Any label using the conditional formatting posted earlier in this post does not pick up on the values populated in the comboboxes. For reference the comboboxes are using code similar to this for their DefaultSelectedItems 

     

 

If(IsBlank(Parent.Default), Blank(), [Parent.Default])​

 

 

That about sums it up. The last post I had on this topic was working towards a reevaluation of the form data but as I started this post, it dead ended after the first failed attempt. Any help would be greatly appreciated especially since I am not a coder by profession.

Categories:
I have the same question (0)
  • v-jefferni Profile Picture
    on at

    Hi @futr_vision ,

     

    Seems like you are using modern forms control, and modern Combo box controls are included in the form. For modern Combo box controls, please make sure DefaultSelectedItems property uses 

    Parent.Default

     

    In addition, If(IsBlank(Parent.Default), Blank(), [Parent.Default])​ is not necessary. The logic of using this formula is redundant. Parent.Default is enough.

     

    Best regards,

  • futr_vision Profile Picture
    831 Moderator on at

    Thanks @Jeff . That formula was given me by the last person that attempted to help out. I originally had [Parent.Default] and the property value because Parent.Default throws and error 'Expected table value'.

  • futr_vision Profile Picture
    831 Moderator on at

    @Jeff or anyone have an idea how to fix this? I'm really stuck finding a solution and don't want to open 3rd post to get some help, Thanks!

  • v-jefferni Profile Picture
    on at

    Hi @futr_vision ,

     

    Could you please tell what's the column type of the specific field?

     

    Best regards,

  • futr_vision Profile Picture
    831 Moderator on at

    Hi @v-jefferni ,

     

    The column type for all of the combo boxes is single line of text.

  • Verified answer
    futr_vision Profile Picture
    831 Moderator on at

    @v-jefferni 
    I've somewhat solved my problem. Instead of using [Parent.Default] for my DefaultSelectedItems in the combo boxes  I switched to something like this:

    {dk_industryname: Parent.Default}

     

    That fixed a number of the label issues. All of them populate with the combo box data. Not all of the triggered the conditional fill. That I am scratching my head on. Not sure why it works for some combo boxes and for others it didn't. 

  • Verified answer
    futr_vision Profile Picture
    831 Moderator on at

    Hi @v-jefferni ,

     

    Ok. Still hashing through trying a bunch of options. I fixed the conditional formatting now. I was doing this

     

     

    If(IsBlank(CB_Industry.Selected.Industry)&&DC_Industry.Required= true ,RGBA(253,222,207,1),RGBA(255,255,255,1))

     

     

    Instead of thisH

     

     

    If(IsBlank(CB_Industry.Selected.'Industry Name')&&DC_Industry.Required= true ,RGBA(253,222,207,1),RGBA(255,255,255,1))

     

     

    That seemed to fix it. Allis good but there is one thing that is really baffling me. I have a single combo box that didn't like the DefaultSelectedItems formatted like this

     

     

    {dk_costcenter: Parent.Default}

     

     

    It only worked if I used

     

     

    [Parent.Default]

     

     

    Looking at the DisplayFields and SearchFields it has ["Value"] as a value instead of ["dk_costcenter"]. Why is that? I think it might have to do with the fact I am using 'Distinct' in the Items property for the combo box.

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 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard