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 / Default ONLY First Gal...
Power Apps
Answered

Default ONLY First Gallery ComboBox Item to Specific Text

(0) ShareShare
ReportReport
Posted on by 5,325 Super User 2025 Season 2
I have Gallery1.

I have Button1 (Add Gallery Item).

Gallery1 has ComboBox1.

The user can create as many items in Gallery1 as is necessary using
Button1.

I want ComboBox1 to default to "Fiber Waste" for the FIRST Gallery1
item, and ONLY the first Gallery1 item.

When subsequent Gallery1 items are created ComboBox1 default content
should be blank with the use able to select from the ComboBox list of items.

Is the above possible?

I am currently using the following to populate the default content into ComboBox1.

It is working, but it populates ALL subsequent Gallery1 ComboBox1 items with
"Fiber Waste", which is not desired.
 
{
   Consumable_Description:
   If(
      Activity_Invoice_Type_Fld.Text in ["Drop", "Storm Work", "Service Call"],
      "Fiber Waste",
      Blank()
   )
}

Categories:
I have the same question (0)
  • Suggested answer
    mmbr1606 Profile Picture
    14,605 Super User 2025 Season 2 on at
    hey
     
     
    can u try this please:
     
    If(
       ThisItem = First(Gallery1.AllItems) && 
       Activity_Invoice_Type_Fld.Text in ["Drop", "Storm Work", "Service Call"],
       { Consumable_Description: "Fiber Waste" },
       Blank()
    )
    
    If my answer was helpful and it solved your issue please mark it as verified answer. If it helped but did not solve please consider giving me a like :)
  • Phineas Profile Picture
    5,325 Super User 2025 Season 2 on at
    The suggestion created a 'circular reference' error.

    Error:
    This rule creates a circular reference between properties, which is not allowed. A property cannot reference itself or other properties affected by its value. This is the shortest circular reference: 'Activity_Consumable_Description_ComboBox'.'DefaultSelectedItems' -> 'Activity_Consumable_Description_ComboBox'.'DefaultSelectedItems'
     
    If(
       ThisItem = First(Consumables_Gallery.AllItems) &&
       Activity_Invoice_Type_Fld.Text in ["Drop", "Storm Work", "Service Call"],
    {
       Consumable_Description:
             "Fiber Waste"},
          Blank()
    )
    -----------------------------------------------------------------------------------------------------------------
  • mmbr1606 Profile Picture
    14,605 Super User 2025 Season 2 on at
    hey
     
     
    what is in the button onselect?
  • Verified answer
    Phineas Profile Picture
    5,325 Super User 2025 Season 2 on at
    I finally got it.


    Consumables Gallery Items has - 
    Filter(colConsumables, !rem)

    Add Consumable button OnSelect has  -
    Collect(
       colConsumables,
       {
          intConsumablesID: GUID(),
          rem: false,
          UniqueID: Activity_Gallery.Selected.intActivitiesID
       }
    );
     
    Set(varConsumablesNoteVisible,false);

    Consumable Description ComboBox has -
    Items:
    Filter(colConsumableChoiceCollection,Consumable_Location = JS_Location_Dropdown.Selected.Project_Name
    && !(Consumable_Description in colConsumablePicked.Consumable_Description))
    DefaultSelectedItems - 
    {
       Consumable_Description:
       If(Activity_Guid_Fld.Text in FirstN(colConsumables.intConsumablesID) And
          CountRows(colConsumables) >=1 And
          Activity_Invoice_Type_Fld.Text in ["Drop", "Storm Work", "Service Call"],
          "Fiber Waste",""
       )
    }

    OnChange - 
    Collect(colConsumablePicked,Activity_Consumable_Description_ComboBox.SelectedItems);
  • mmbr1606 Profile Picture
    14,605 Super User 2025 Season 2 on at
    hey
     
     
    glad you were able to solve the issue.
     
     
    for future topics a request for those who help:
     
    please include all relevant code parts that interact with the ones making trouble ;)
    it will make it easier for us to spot potential issues
     
     
    thanks in advance

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

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard