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

Breaking down fields

Hello all,

I am pretty new to PowerApps and need some help.  I'll try to describe it as easy as possible.

 

I have a lookup column in SharePoint that is getting the values of the dropdown from a separate list. The values look similar to this: 123 - abc - def - 456

 

I need the dropdown to only display "123 - abc"

THEN I need to autopopulate another column with "def", then in a third column autopopulate "456".  The second and third column do not need to appear in the PowerApps but I am wondering if I still need to configure this in PowerApps then just not display the fields in the form?

 

Thank you for any help you can provide and ill answer any questions.

1 ACCEPTED SOLUTION

Accepted Solutions
v-qiaqi-msft
Community Support
Community Support

Hi @Poseidon10,

Do you want to split the LookUp column value into three parts and assign the two of them into separate column?

Could you please tell me that if you want to split the whole dropdown list values?

Actually, if you want the LookUp column only display part of the droddown list values, I don't think making itself a LookUp column is a good choice. Of course since I'm not sure about your build of your app, there are likely to be limitations to my ideas. In any case, let's try how to filter a LookUp column.

Add a button to create a collection by setting the OnSelect property as below:

ClearCollect(
    dfg,
    AddColumns(
        Split(
            Concat(
                String.Title,
                Title,
                ","
            ),
            ","
        ),
        "Part1",
        Concat(
            FirstN(
                Split(
                    Result,
                    "-"
                ),
                2
            ).Result,
            Result,
            "-"
        ),
        "Part2",
        Last(
            FirstN(
                Split(
                    Result,
                    "-"
                ),
                3
            )
        ).Result,
        "Part3",
        Last(
            Split(
                Result,
                "-"
            )
        ).Result
    )
)

Note that the String is the separate list where has a Title column to store the strings as you described. I suggest that you refer to this separate list directly.

vqiaqimsft_0-1630376858384.png

Then if you want to populate the Combo Box with the result, you could set the Items as below:

dfg.Part1

 

Best Regards,
Qi

View solution in original post

3 REPLIES 3
v-qiaqi-msft
Community Support
Community Support

Hi @Poseidon10,

Do you want to split the LookUp column value into three parts and assign the two of them into separate column?

Could you please tell me that if you want to split the whole dropdown list values?

Actually, if you want the LookUp column only display part of the droddown list values, I don't think making itself a LookUp column is a good choice. Of course since I'm not sure about your build of your app, there are likely to be limitations to my ideas. In any case, let's try how to filter a LookUp column.

Add a button to create a collection by setting the OnSelect property as below:

ClearCollect(
    dfg,
    AddColumns(
        Split(
            Concat(
                String.Title,
                Title,
                ","
            ),
            ","
        ),
        "Part1",
        Concat(
            FirstN(
                Split(
                    Result,
                    "-"
                ),
                2
            ).Result,
            Result,
            "-"
        ),
        "Part2",
        Last(
            FirstN(
                Split(
                    Result,
                    "-"
                ),
                3
            )
        ).Result,
        "Part3",
        Last(
            Split(
                Result,
                "-"
            )
        ).Result
    )
)

Note that the String is the separate list where has a Title column to store the strings as you described. I suggest that you refer to this separate list directly.

vqiaqimsft_0-1630376858384.png

Then if you want to populate the Combo Box with the result, you could set the Items as below:

dfg.Part1

 

Best Regards,
Qi

hi Qi,

 

To answer your first question, yes, I would like to split the value of the lookup column to only show part of the text.  The column shows  "123 - abc - def - 456", however when they go to the dropdown field to make their selection I only want them to see "123 - abc".  Then when they select it, I need the other field to show "def" and a third field to show "456."

 

Thank you for your help.

Hi @Poseidon10,

How could you make the Dropdown field only display "123-abc", I am quite confused of the condition that made this happen? The condition could only in your mind, I just charge of the solution, you did not tell me that the condition.

To populate other column, I think you could add a Gallery and populate it with the collection I mentioned before, and they will show as a complete record within the Gallery.

Best Regards,
Qi

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on June 15, 2022 at 8am PDT.

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.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

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