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

sharepoint powerapp show same field few times

hello Everyone

i am trying to build a time sheet for the company.  i have created sharepint database with 2 columns.  Project and hours

i need to create a power app to have mutiple line items and collect  project ID and many hours worked.  Is this possible.

 

Project                       hours

Project                       hours

Project                       hours

Project                       hours

 

Is this possible.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: sharepoint powerapp show same field few times

Hi @tasefi ,

 

Gallery is convenient to handle multiple lines items in one screen. And I made a test for you to get what you want , you can refer to following steps.

  • Create an empty Gallery
  • Add two labels named Project and Hours
  • Add two textinput to collect value. Apply patch() formula to OnChange property of TextInput as below:
Patch(SP List ,ThisItem , {Project:TextInput1.Text}) // Project Textinput
Patch(SP List ,ThisItem , {Hours:TextInput2.Text})  // Hours Textinput
  • Add a ‘ADD Row’ button to create new row to gallery(Title is default primary key, ID is autonumber)
If(IsEmpty(SP List),Collect(SP List,{Title:"1"}),Collect(SP List,{Title: Text(Last(SP List).ID+1)}))    //OnSelect property
  • Add a ‘Remove’ button to delete selected row in gallery.
Remove(SP List, Gallery1.Selected)   //OnSelect property

Annotation 2019-09-09 184024.png

Best regards,

Sik

View solution in original post

2 REPLIES 2
Highlighted
Dual Super User III
Dual Super User III

Re: sharepoint powerapp show same field few times

Hi @tasefi 

 

Yes, you can do that by creating a gallery control, select the blank vertical type. Inside of it, you can create two text boxes to accept user input items and patch the change once this is done to sharepoint, using the Patch() function.
 
I have written a blog on a similar scenario, please refer the dynamic gallery part to achieve this: https://www.appliedis.com/how-to-use-galleries-in-powerapps/
 
Hope this Helps!
 
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
Highlighted
Community Support
Community Support

Re: sharepoint powerapp show same field few times

Hi @tasefi ,

 

Gallery is convenient to handle multiple lines items in one screen. And I made a test for you to get what you want , you can refer to following steps.

  • Create an empty Gallery
  • Add two labels named Project and Hours
  • Add two textinput to collect value. Apply patch() formula to OnChange property of TextInput as below:
Patch(SP List ,ThisItem , {Project:TextInput1.Text}) // Project Textinput
Patch(SP List ,ThisItem , {Hours:TextInput2.Text})  // Hours Textinput
  • Add a ‘ADD Row’ button to create new row to gallery(Title is default primary key, ID is autonumber)
If(IsEmpty(SP List),Collect(SP List,{Title:"1"}),Collect(SP List,{Title: Text(Last(SP List).ID+1)}))    //OnSelect property
  • Add a ‘Remove’ button to delete selected row in gallery.
Remove(SP List, Gallery1.Selected)   //OnSelect property

Annotation 2019-09-09 184024.png

Best regards,

Sik

View solution in original post

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (6,345)