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 / Using a Form Connected...
Power Apps
Suggested Answer

Using a Form Connected to SP List #1 While Using a Combo Box with the Choices From SP List #2

(1) ShareShare
ReportReport
Posted on by 134
I am trying to use a combo box in a form that uses a different SP list than the form. The image below describes what I'm trying to do.  What is the best method to achieve this?

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    155,779 Most Valuable Professional on at
    Hi zoso2112 
    It seems you have already done this - the Items of the Combo Box would be
    Choices('Choice Options'.'Work Centers')
    What is not working and also what type of field is 'Work Center' in 'Line Inspection Min Max Weights' ?
    If is is a Multi-Value Choice column (please do not tell me it is a Lookup column) and your Combo Box (as it appears) is multi-select, then the Update of your Data Card should be
    YourComboBoxName.Selected

    Please click 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 giving it a Like.
    MVP (Business Applications)     Visit my blog Practical Power Apps    Buy me a coffee


  • zoso2112 Profile Picture
    134 on at
    Is it even possible to have a form connected to one SP list and have a combo box connected to a different SP list? 
  • zoso2112 Profile Picture
    134 on at
    WarrenBelz - Thank you for your response. 

    The SharePoint list populating the combo box is referencing a SP choice multi-item select column as is the form's SharePoint list column for 'Work Center'.

    For the combo box I have:
    Items: Choices('Prod Lines Choice Options'.'Prod Line Choices')
    DisplayFields: ["Value"]


    I can't seem to get the correct code for the form's Work Center's data card's UPDATE property. I used comboBox_WkCenter.Selected and there are no syntax errors, but it doesn't write any data to the SP list Work Center's column. Since it is a multi-item select choice column, the UPDATE really should be comboBox_WkCenter.SelectedItems but there is a syntax error "Expected Record value".

    The crazy thing is I have tried all the code below trying to find the correct code for UPDATE but all have the same syntax error "Expected Record value":

    // "Expected Record value"
    ForAll(comboBox_WkCenter.SelectedItems, {Value: ThisRecord.Value })
    comboBoxChoices.SelectedItems
    comboBox_WkCenter.Selected.'Work Center'
    Split(Concat(comboBox_WkCenter.SelectedItems, 'Prod Line Choices' & ";"), ";")
    Table(ForAll(comboBox_WkCenter.SelectedItems, {Value: ThisRecord.'Prod Line Choices'}))
    ForAll(comboBox_WkCenter.SelectedItems, {Value: ThisRecord.'Prod Line Choices' }) 
    ForAll(comboBox_WkCenter.SelectedItems, {Value: 'Prod Line Choices'})


    // No syntax error but throws generic error when form submitted (all required fields are satisfied)
    {Value: Concat(comboBox_WkCenter.SelectedItems, Value, ";")}
    {Value: ThisItem.'Work Center'} â€‹â€‹â€‹â€‹â€‹â€‹â€‹

    This one seems close but it has a nested table that I can't figure out how to extract:
    {Value: comboBox_WkCenter.SelectedItems} // has nested Table; no errors expect when form submitted but failed to write combo box data
     
    Record Data Type (Value has nested Table) Table Data Type

     
  • WarrenBelz Profile Picture
    155,779 Most Valuable Professional on at
    Try in the Update
    ForAll(
       comboBox_WkCenter.SelectedItems As _Items, 
       {Value: _Items.Value}
    ) 
     
  • zoso2112 Profile Picture
    134 on at
    WarrenBelz - I tried your suggestion and I got the familiar syntax error,  "Expected Record value". 
    ForAll(
       comboBox_WkCenter.SelectedItems As _Items, 
       {Value: _Items.Value}
    )
     
  • WarrenBelz Profile Picture
    155,779 Most Valuable Professional on at
    That suggests you are writing back to a single value choice column (it expects a Record, not a Table). I just tested the code on a multi-value Combo Box writing back to another (the choices came from another list as per yours) multi value choice column and it worked as expected. It also explains why comboBox_WkCenter.Selected does not work.
  • zoso2112 Profile Picture
    134 on at
    WarrenBelz - Thank you for following up on this. I made a mistake in describing the issue. I am NOT using the 'Work Centers' text type column to populate the combo box choices, but instead I am using the 'Prod Line Choices' choice multi-item select column (see image below).  Can you make any recommendations based on the new information?


     
  • Suggested answer
    zoso2112 Profile Picture
    134 on at
    WarrenBelz - Thank you for all your help. I created a new SP list to save my data and now the 'Work Center' choice column is now being saved.  I used the same code as before but this time I used comboBox.SelectedItems for Work Center data card Update property, and it did not throw the "Expected Record value" error. I had previously tried a new screen and a new form so the root cause was the SP list. Go figure. Thanks again!
  • WarrenBelz Profile Picture
    155,779 Most Valuable Professional on at
    So this is now solved ?
  • zoso2112 Profile Picture
    134 on at
    WarrenBelz - Yes, creating a new SP list solved the issue. 

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 477

#2
WarrenBelz Profile Picture

WarrenBelz 341 Most Valuable Professional

#3
11manish Profile Picture

11manish 317

Last 30 days Overall leaderboard