cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Flensborg
Frequent Visitor

SharePoint List form, Multiple type answer for one question

Hi all, I'm still a bit new to PowerApps. I'm currently creating a form, where I've changed the visibility of the Dropdown/TextInput Box.

 

Currently it's as following:

Type of Project = Execution --> Dropdown list becomes visible (and works perfectly)

Type of Project = New Product Development --> TextInput Box becomes visible (and does not work)

 

The issue is that this is connected to a SharePoint list, and when creating a new answer, the "Project" column is empty if there has been entered in the Textbox. If someone has selected a dropdown of Execution Project it shows up in the column.

 

 

Flensborg_0-1656404934725.pngFlensborg_1-1656404962069.png

 

This is the output in the list with the abovewritten settings, where every New Product Development field ends up empty:

Screenshot 2022-06-28 103428.png

 

My question is therefore, how do I make it work so both the Dropdown and TextInput Box ends in the same column?

 

Best Regards,

Daniel

 

3 REPLIES 3
theapurva
Super User
Super User

hello,
you can use if in Patch function as below:

Patch(listName,Defaults(listName),{'Project Type':typeOfProjectDropdown.Selected.Value,
Project: If(typeOfProjectDropdown.Selected.Value="Execution Project",ProjectDropdown.Seleceted.Value,ProjectTextBox.Text)});

 

-----------------------------------------------------------------------------------
Liked My Solution? Click on the Thumbs Up below.
Did I answer your Question? Please Click Accept as Solution below

Want to Support me? Buy Me A Coffee

Thank you for your reply. Should I put this into the OnSelect of the text-box of ProjectID, the field "Project" or where?


I have tried a bit, but can't seem to crack it. Sorry that I am not very skilled with PowerApps and need to have it explained so much  

theapurva
Super User
Super User

Hello,
How are you saving data to SharePoint. Wherever you have written your Patch function..just replace it.
you should be having a button to save the data

Patch(listName,Defaults(listName),{'Project Type':typeOfProjectDropdown.Selected.Value,
Project: If(typeOfProjectDropdown.Selected.Value="Execution Project",ProjectDropdown.Seleceted.Value,ProjectTextBox.Text)});



So please put this formula OnSelect property of that button.

-----------------------------------------------------------------------------------
Liked My Solution? Click on the Thumbs Up below.
Did I answer your Question? Please Click Accept as Solution below

Want to Support me? Buy Me A Coffee

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

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