cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
vishalgoyal2472
Helper I
Helper I

Lookup Column Cascade Dropdown not showing selected data in Edit Mode

I have a Tasks Sharepoint List which has two lookup column System and 'Ticket System', both are lookup column(Single select) and data is coming from another List named as "Implementation Systems & Ticket Systems" having column System(internal name-Title) and Ticket System, In this List a Single System can have single/multiple 'Ticket System' value like in attached image "Implementation Systems & Ticket Systems List.PNG"  where iDocs is having two ticket system values ALM or DMR. 

 

Now I have created power app and inserted edit form and bind it with Tasks List in Power APP(Tasks List custom Power APP) now if a user selects any System (it should be distinct for example iDocs should come single time) corresponding Ticket System options should be load in Ticket System column dropdown values so user can select any one of the Ticket System (if there are multiple), I have  bind items property, update property(code at the end) , this is working and saves the value correctly in New Mode but I am facing below issues.

1-In Edit Mode saved value is there but its not selected in dropdown (neither in System dropdown nor in Ticket System) as in attached image System.PNG

2-In Edit form When I click on Ticket System dropdown icon it disappears and only comes back when I change the value in System Dropdown as in Ticket System.PNG

3-In new form When I change the value of System it loads the corresponding values in Ticket System but does not clears the previous selected value from the box.

 

Power app Form code for both columns

 

System Column

items property

Distinct(Choices([@Tasks].System),Value)

update Property

{
    '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
    Id: LookUp(
        'Implementation Systems & Ticket Systems',
        And(
            Title = DataCardValue17.Selected.Result,
            'Ticket System' = DataCardValue21.Selected.'Ticket System'
        ),
        ID
    ),
    Value: DataCardValue17.Selected.Result
}

 

Ticket System 

items property

Filter('Implementation Systems & Ticket Systems',Title=DataCardValue17.Selected.Result).'Ticket System'

 

update property

{
    '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
    Id: LookUp(
        'Implementation Systems & Ticket Systems',
        And(
            Title = DataCardValue17.Selected.Result,
            'Ticket System' = DataCardValue21.Selected.'Ticket System'
        ),
        ID
    ),
    Value: DataCardValue21.Selected.'Ticket System'
}

 

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @vishalgoyal2472 ,

Could you please share a bit more about the formula you typed within the Items property of the 'Ticket System' ComboBox?

 

I have made a test on my side, and don't have the issue that you mentioned. The screenshot as below:

2.JPG

 

In addition, please also consider set the Items property of the 'Ticket System' ComboBox to following:

Distinct(
          Filter('Implementation Systems & Ticket Systems',Title=DataCardValue17.Selected.Result),
          'Ticket System'
)

set the Update property of the 'Ticket System' field data card to following:

{
    '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
    Id: LookUp(
        'Implementation Systems & Ticket Systems',
        And(
            Title = DataCardValue17.Selected.Result,
            'Ticket System' = DataCardValue21.Selected.Result  // Modify formula here
        ),
        ID
    ),
    Value: DataCardValue21.Selected.Result     // Modify formula here
}

Set the DefaultSelectedItems property of the 'Ticket System' ComboBox to following:

{
  Result: ThisItem.'Ticket System'.Value
}

 

If the issue still exists, please consider remove the ComboBox within the 'Ticket System' field data card, then re-add a new one within it, then try above solution again, check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

9 REPLIES 9
v-xida-msft
Community Support
Community Support

Hi @vishalgoyal2472 ,

For your first question, please consider take a try with the following workaround:

Set the DefaultSelectedItems property of the System ComboBox to following:

 

{
    Result: ThisItem.System.Value
}

 

Set the DefaultSelectedItems property of the 'Ticket Systems' ComboBox to following:

 

{
   'Ticket System': ThisItem.'Ticket System'.Value
}

 

 

For your second question, please check if you have set up formula in your app to change the Chevron backgroud color when you click the 'Ticket Systems' ComboBox. I have made a test on my side, and don't have the issue that you mentioned, please consider remove the 'Ticket Systems' ComboBox from the 'Ticket Systems' data card, then add a new ComboBox control, bind it to the 'Ticket Systems' field in your Edit form.

 

For your third question, do you want to reset the 'Ticket Systems' ComboBox when you change the selected value within the System ComboBox? Please consider take a try with the following workaround:

Set the OnChange property of the System ComboBox to following:

 

Reset(TicketSystemComboBox)

 

or

Set the OnChange property of the System ComboBox to following:

 

Set(IsReset, false);Set(IsReset, true);

 

set the Reset property of the  'Ticket Systems' ComboBox to following:

 

IsReset

 

 

Please consider take a try with above solution, then check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@v-xida-msft 

Thank you very much for your reply.


1-I have put the same values in DefaultSelectedItems for System and Ticket System, Now I can see saved value is also selected in System drop-down but this is not working for Ticket System.

2-Reset function is working now
3-Now issue is not there after changing DefaultSelectedItems property of  System Column.

Hi @vishalgoyal2472 ,

Have you solved your problem?

Is the solution I provided above helpful in your scenario?

 

If you have solved your problem, and the solution I provided above is helpful in your scenario, please consider go ahead to click "Accept as Solution" to identify this issue as Solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

No this is not working entirely, I have put the same values in DefaultSelectedItems for Ticket System but while editing the form there is no value in the field nor it is selected.

 

Hi @vishalgoyal2472 ,

Based on the issue that you mentioned, I think you have some misunderstanding with the solution I provided. The formula you typed within the DefaultSelectedItems property System ComboBox and Ticket System ComboBox should not be the same.

 

Please set the DefaultSelectedItems property of the System ComboBox to following:

{
    Result: ThisItem.System.Value
}

Set the DefaultSelectedItems property of the 'Ticket Systems' ComboBox to following:

{
   'Ticket System': ThisItem.'Ticket System'.Value   // Specify the 'Ticket System' proeprty here rather than Result
}

Note: The 'Ticket System' column represents the display value column within your 'Ticket Systems' ComboBox.

Please check if you have specified proper property name within the DefaultSelectedItems property of the 'Ticket Systems' ComboBox 

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Yes I have put the different values in System and Ticket System (please see the screen attached name DefaultselectedItems.PNG), System dropdown is working but Ticket system dropdown is not working and its also not showing any value in the box.

 

DefaultSelectedItems property of the System ComboBox to following:

{
    Result: ThisItem.System.Value
}

DefaultSelectedItems property of the 'Ticket Systems' ComboBox to following:

{
   'Ticket System': ThisItem.'Ticket System'.Value   // Specify the 'Ticket System' proeprty here rather than Result
}

 

Hi @vishalgoyal2472 ,

Could you please share a bit more about the formula you typed within the Items property of the 'Ticket System' ComboBox?

 

I have made a test on my side, and don't have the issue that you mentioned. The screenshot as below:

2.JPG

 

In addition, please also consider set the Items property of the 'Ticket System' ComboBox to following:

Distinct(
          Filter('Implementation Systems & Ticket Systems',Title=DataCardValue17.Selected.Result),
          'Ticket System'
)

set the Update property of the 'Ticket System' field data card to following:

{
    '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
    Id: LookUp(
        'Implementation Systems & Ticket Systems',
        And(
            Title = DataCardValue17.Selected.Result,
            'Ticket System' = DataCardValue21.Selected.Result  // Modify formula here
        ),
        ID
    ),
    Value: DataCardValue21.Selected.Result     // Modify formula here
}

Set the DefaultSelectedItems property of the 'Ticket System' ComboBox to following:

{
  Result: ThisItem.'Ticket System'.Value
}

 

If the issue still exists, please consider remove the ComboBox within the 'Ticket System' field data card, then re-add a new one within it, then try above solution again, check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

this solution is working and 1st and 3 point has been resolved

But 2nd point resetting dropdown is not working in Edit form from your below solution.

 

Reset(TicketSystemComboBox)

or

Set the OnChange property of the System ComboBox to following:



Set(IsReset, false);Set(IsReset, true);

set the Reset property of the 'Ticket Systems' ComboBox to following:



IsReset

 

Hi @vishalgoyal2472 ,

Currently, I could not reproduce your issue on my side. Do you mean the Reset formula I provided above could not work when the Edit form is in Edit mode?

 

The note you need to know is that -- the above solution would reset the 'Ticket System' ComboBox to default selected options when the Edit form is in Edit mode, it would not clear up the selected options within the 'Ticket System' ComboBox when the Edit form is in Edit mode.

If you want to clear up the selected options within the 'Ticket System' ComboBox when your Edit form is in Edit mode, please take a try with the following workaround:

1. Enable the "Formula-level error management" option within Advanced settings of App settings of your app.

2. Set the OnChange property of the System ComboBox to following:

If(
   EditForm1.Mode = FormMode.Edit,
   Patch('Tasks List', ID = ThisItem.ID, {'Ticket System': Blank()}),   // Clear up the 'Ticket System' column
   Set(IsReset, false);Set(IsReset, true)
)

Please check and see if the following blog would help in your scenario:

https://powerapps.microsoft.com/en-us/blog/new-feature-error-handling-and-writing-null-values-to-dat...

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Top Solution Authors
Top Kudoed Authors
Users online (2,476)