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 / Issue with Text field ...
Power Apps
Unanswered

Issue with Text field using as combo-box

(0) ShareShare
ReportReport
Posted on by 63

Hi, 

 

We are trying to create a PowerApp form for our SharePoint list and we are facing the below issue. 

 

There are two text fields in SharePoint list , Category and Sub-Category. When i create the powerapps form I converted this to a combo box. because, we want to create a new item when the data is not already present in the field if its already exist user can select from the dropdown list. 

 

I am able to create the new record, I can either select from the combo box list or I can type a new value and I can save. The problem I am facing is , When i try to edit a field value other field value is getting deleted. 

 

Ex: creating a new record with values Category = Test and Sub-Category= Test 1, if i try to update the Sub-Category value the Category value  is getting deleted. 

 

These are my codes: 

Item :- [listname].Category

Datacard Update :-  

If(
IsBlank(ComboBox1_1.Selected.Category),
ComboBox1_1.SearchText,
ComboBox1_1.Selected.Category
)

Combobox Defaultselected items:-

 

If(
SharePointForm1.Mode = FormMode.New,
{
'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
Value: ""
},
{ /* <-- Modify here, type a record value rather than a Text value */
'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
Value: ThisItem.Category
}
)

Can anyone please help on this ?  Appreciate your help

 

Thanks 

 

 

 

 

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

    Hi @Yama_Vin ,

    I think the reason is here

    If(
     IsBlank(ComboBox1_1.Selected.Category),
     ComboBox1_1.SearchText,
     ComboBox1_1.Selected.Category
    )

    If ComboBox1_1.Selected.Category is blank, there is no SearchText so it will write a blank value back to your list.

     

    Please click Accept as solution 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 giving it Thumbs Up.

  • v-yutliu-msft Profile Picture
    Microsoft Employee on at

    Hi @Yama_Vin ,

    Do you mean that when you create a new record,  Category value will be cleared?

    Could you show me the settings of Sub-Category field?

    You only show me the settings of Category field, I do not find any place related to Sub-Category field.

    Since Category  is text type, I do not think you need to set so complex. Try this:

    Item :- listname

    primary text: Category

    Datacard Update :-  

    If(
    IsBlank(ComboBox1_1.Selected.Category),
    ComboBox1_1.SearchText,
    ComboBox1_1.Selected.Category
    )

    Combobox Defaultselected items: ThisItem

     

    Best regards,

  • WarrenBelz Profile Picture
    156,425 Most Valuable Professional on at

    @v-yutliu-msft , not sure why your repeated my post here.

    @Yama_Vin - happy to continue this discussion when you confirm my assumption.

  • Yama_Vin Profile Picture
    63 on at

    @WarrenBelz  Thanks ! 

     

    In this case, combobox1_1 is not blank. This is what I am doing 

     

    Step 1-  Creating a New Record with Category and Sub category . item is saved 

    Step 2:   Editing the record, When I click edit button in SharePoint, Form will open with Category and Subcategory value.  Now,                    when i try to edit any field value and save, other field value is getting deleted. 

     

    Sub Category Update -- 

     

    If(
    IsBlank(ComboSubCategory.Selected.Result),
    ComboSubCategory.SearchText,
    ComboSubCategory.Selected.Result
    )

     

    Category Update 

     

    If(
    IsBlank(CategoryCombo.Selected.Result),
    CategoryCombo.SearchText,
    CategoryCombo.Selected.Result
    )

     

     

    Thanks 

     

  • Yama_Vin Profile Picture
    63 on at

    @v-yutliu-msft 

     

    I am able to create new record and i can retrieve the data when opening . Problem is when I try to edit the record.  When I edit one field value other field value is getting deleted. 

     

    Thanks 

  • WarrenBelz Profile Picture
    156,425 Most Valuable Professional on at

    Hi @Yama_Vin ,

    Clearly the .SearchText reference is doing this and writing back a blank value. I will firstly say I have never used that property and the ComboBox reference does not mention it, but it would appear to me to be whatever is typed in the "search" field (which would be blank in your case). So for a start, try this

    If(
     !IsBlank(ComboBox1_1),
     ComboBox1_1.Selected.Category
    )

    and this

    If(
     !IsBlank(ComboSubCategory),
     ComboSubCategory.Selected.Result
    )

    Also if this does not fix the issue, please tag whoever you want to continue this thread with as I have found that three-way conversations do nothing but confuse everyone.

     

    Please click Accept as solution 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 giving it Thumbs Up.

  • WarrenBelz Profile Picture
    156,425 Most Valuable Professional on at

    Hi @Yama_Vin ,

    Just checking if you got the result you were looking for on this thread. Happy to help further if not.

     

    Please click Accept as solution 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 giving it Thumbs Up.

  • Yama_Vin Profile Picture
    63 on at

    @WarrenBelz  

    Thanks . I will try this let you know ,if this resolve my issue. 

     

    Thank you @

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 Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 345 Most Valuable Professional

#2
11manish Profile Picture

11manish 207 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 177

Last 30 days Overall leaderboard