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

add item in a dropdown

 hi to all i have a dropdown that is popolated by a choise in a sharpoint. The list called peopleGender and the column gender

Choices('peopleGender '.gender).Value give in the output the two choised of sharepoint "male", female"

i put in dropdow item Choices('peopleGender '.gender).Value and it show me the two value, i want add another field until "male", female" in dropdown. it's possible?

 

thanks in advance

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @vincenzos1984_1 :

Do you want to bring "Other" and "AnOther" to the front?

Please try this code:

 

Distinct(/*Remove duplicates to prevent duplicate options from being duplicated with the original options*/
    Split(/*Change the new string back to the table*/
        Concatenate(/*Add new options (also separated by ";")
*/
            "Other",
            ";",
            "AnOther",
            ";",
            Concat(/*Adjust the original table options to ";" separated string*/
                Choices(peopleGender.gender),
                Value,
                ";"
            )
        ),
        ";"
    ),
    Result
)

 

 

Best Regards,

Bof

View solution in original post

7 REPLIES 7
Super User III
Super User III

You can replace that with:

["Male","Female","Other","Another"]

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

i need take choise dinamycally.. if someone add another choise on sharpoint your solution work whitout new Choises

Your own solution is already dynamic

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

when i put this?

["Male","Female","Other","Another"] ? if i put directly in item is static solution

i need take choises from sharepoint and add only a static value

Hi @vincenzos1984_1 :

Do you wish to add other options to the drop-down control?

My method is to achieve dynamic results through function composition.

I suggest you try this code:

 

Distinct(   /*Remove duplicates to prevent duplicate options from being duplicated with the original options*/
    Split( /*Change the new string back to the table*/
        Concatenate(     /*Add new options (also separated by ";")
*/
            Concat(    /*Adjust the original table options to ";" separated string*/
                Choices(peopleGender.gender),
                Value,
                ";"
            ),
            ";",
            "Other",
            ";",
            "AnOther"
        ),
        ";"
    ),
    Result
)

 

1.jpg

Best Regards,

Bof

 

thanks a lot im going to test this it's what i want :), it's possible to add first the static value ["Other","Another"] and after concatenate the choises?

 

thanks in advance

Hi @vincenzos1984_1 :

Do you want to bring "Other" and "AnOther" to the front?

Please try this code:

 

Distinct(/*Remove duplicates to prevent duplicate options from being duplicated with the original options*/
    Split(/*Change the new string back to the table*/
        Concatenate(/*Add new options (also separated by ";")
*/
            "Other",
            ";",
            "AnOther",
            ";",
            Concat(/*Adjust the original table options to ";" separated string*/
                Choices(peopleGender.gender),
                Value,
                ";"
            )
        ),
        ";"
    ),
    Result
)

 

 

Best Regards,

Bof

View solution in original post

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (7,029)