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 PowerApps to mod...
Power Apps
Answered

Using PowerApps to modify a SharePoint form, so that two different fields are saved on a single column of a SharePoint list

(0) ShareShare
ReportReport
Posted on by 14

Hello,

 

I have a simple question that I can´t seem to resolve or find an aswer to:

 

I have a SharePoint list with 15 fields, and I'm modifying the form used to add new items. In the list one of the fields is "Hiring Source", which is a dropdown list with 6 options: Social Media, recommended, field work, marketing, job boards or other.

 

When an user selects "Social Media" a second dropdown becomes visible for specification. Also, if an user selects "Other" a text box becomes visible for the same reason. But on the SharePoint list I'm using a single column, so if an user selected "Social Media" and then "Facebook" when populating the form, I need Facebook to appear on the list and not "Social Media", same for "Other".

 

So far I've used the following If condition to make one of the both be true on the Update property.

Sin título.png

Where dd_fuentes-reclut1 is the dropdwon with the 6 options includind Social Media and Other, and tb.fuentes-reclut1 is the text box for Other option.

 

If I use: If('dd_fuentes-reclut1'.SelectedText.Value = "Redes Sociales"; 'dd_fuentes-reclut2'.SelectedText.Value ; 'dd_fuentes-reclut1'.SelectedText.Value), in this case dd_fuentes-reclut2 is the second dropdown where I list the different social media.

 

So far I can only make one of the both work out, so I either use the first formula for the Other option or the second one for the Social Media. I've tried:

 

If('dd_fuentes-reclut1'.SelectedText.Value = "Redes Sociales"; 'dd_fuentes-reclut2'.SelectedText.Value ; If('dd_fuentes-reclut1'.SelectedText.Value = "Otra" ; 'tb.fuentes-reclut1'.Text.Value ; 'dd_fuentes-reclut1'.SelectedText.Value)

 

But since the first part is always true, it doesnt reads the second IF statement.

 

Help please

 

Categories:
  • Gerard Simpson Profile Picture
    2,987 Moderator on at

    Hi @Martin_Caballer 

     

    Can you try:

     

    If(

    'dd_fuentes-reclut1'.SelectedText.Value = "Redes Sociales"; 'dd_fuentes-reclut2'.SelectedText.Value,

    'dd_fuentes-reclut1'.SelectedText.Value = "Otra"; 'tb.fuentes-reclut1'.Text;

    'dd_fuentes-reclut1'.SelectedText.Value

    )

     

    *Note you may need to change to Selected.Value instead of SelectedText.Value for the dropdown values, but see how you go

  • Verified answer
    Martin_Caballer Profile Picture
    14 on at

    Hi @AmDev 

     

    Thanks, although that code didn't work it did help me find this code that seemed to do the trick:

     

    If('dd_fuentes-reclut1'.SelectedText.Value = "Redes Sociales" ; 'dd_fuentes-reclut2'.SelectedText.Value ; 'dd_fuentes-reclut1'.SelectedText.Value = "Otra"; 'tb.fuentes-reclut1'.Text ;'dd_fuentes-reclut1'.SelectedText.Value)

     

    It looks like using another logic in the false option without opening another IF does work like in excel and my form is saving the information as intended.

     

    Best regards.

  • Gerard Simpson Profile Picture
    2,987 Moderator on at

    Hi @Martin_Caballer  - Glad you got sorted. 

     

    I was trying to spot what the difference was between my code and your code. I see I had typed a ',' instead of a ';' after the first argument by mistake due to the syntax used in my geography - when I was arranging the expression over multiple lines to make it more readable for you 🙂

     

    Setting that typo aside, I would like to think my suggestion demonstrated the fundamental concept of how to structure your IF statement to achieve your end result, albeit you had to correct my typo. 

     

    If you agree please consider also marking this as a solution, but if not and the typo caused you a lot of grief, no problem and all the best with your build 👍

     

     

  • Martin_Caballer Profile Picture
    14 on at

    Hi @AmDev 

     

    Don't worry the syntax of "," wasn't a problem since I already expected the difference.

     

    The difference in the code is in how PowerApps perceived it.

     

    If(

    'dd_fuentes-reclut1'.SelectedText.Value = "Redes Sociales" (logical test) ;

    'dd_fuentes-reclut2'.SelectedText.Value, 'dd_fuentes-reclut1'.SelectedText.Value = "Otra" (value if true) ;

    'tb.fuentes-reclut1'.Text (logical test) ;

    'dd_fuentes-reclut1'.SelectedText.Value (value if true)

    )

    So it isn't detecting a full formula, and the second logic is taken as part of the first true statement. After that I tried with "or" for the logical test:

     

    If(

    'dd_fuentes-reclut1'.SelectedText.Value = "Redes Sociales" or 'dd_fuentes-reclut1'.SelectedText.Value = "Otra" (logical test) ;

    'dd_fuentes-reclut2'.SelectedText.Value ;; 'tb.fuentes-reclut1'.Text (value if true) ;

    'dd_fuentes-reclut1'.SelectedText.Value (value if false)

    )

    The problem here is that im combining Booleans and strings, so I went for a simplier approach:

     

    If(

        'dd_fuentes-reclut1'.SelectedText.Value = "Redes Sociales" (logical test) ;

        'dd_fuentes-reclut2'.SelectedText.Value (value if true) ;

        'dd_fuentes-reclut1'.SelectedText.Value = "Otra" (value if false taken as logical test) ;

        'tb.fuentes-reclut1'.Text (value if true);

        'dd_fuentes-reclut1'.SelectedText.Value (value if false)

    )

    So looking at it simplier:

     

    If(

        'dd_fuentes-reclut1'.SelectedText.Value = "Redes Sociales" ;

        'dd_fuentes-reclut2'.SelectedText.Value ;

        If(

            'dd_fuentes-reclut1'.SelectedText.Value = "Otra" ;

            'tb.fuentes-reclut1'.Text ;

            'dd_fuentes-reclut1'.SelectedText.Value

        )

    )

     

    But if I used this code it will not read the seconf If, but without the If it does read the second part (don't know why)

     

    I don't know if it has something to do with my language settings that PowerApps is not reading your code as intended, but that is the difference from my side.

     

    Best regards

     

     

     

     

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 354 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 330

#3
Mohsin Ali Profile Picture

Mohsin Ali 232

Last 30 days Overall leaderboard