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

Applying a multiplier to a text input field within a gallery - but from an item in the same gallery

I have just started out with PA and am putting together a basic quotation tool.  My users can select tasks and sub-tasks from a gallery in one screen, then in the next screen they can allocate the time needed to complete each subtask.

 

However, one of those items is explicitly dependent on another item - so if (in the example below) there is time entered against "Attend Meetings" then there must be a set amount of multiplier time entered against "Minutes/Notes" by default, though it can be overridden if needed.

aaronhowe_0-1647452444799.png

The problem is I can't seem to work out a way of populating the hours field for "Minutes/Notes" once "Attend Meetings" has been completed and have it update when all of those input fields are coming from the same text input control (Text_StaffHours1).

 

I tried creating a secondary field which is only visible for the row with the name "Minutes/"Notes" but even then I couldn't work out how to filter only the hours applicable to the "Attend Meetings" line.

 

In summary, the user journey should be:

  • From the previous list of items, select "Attend Meetings" and "Minutes/Notes" from the available options
  • In this screen, enter an amount of time for "Attend Meetings"
  • Minutes/Notes then automatically populates with a multiplied value of the hours in "Attend Meetings"

Sub-tasks ("Attend Meetings", "Minutes/Notes" etc are within label field Label_SubTaskName

Hours are within text field Text_StaffHours1

 

Am I asking for the impossible?  Or coming at this with the wrong control types?

1 ACCEPTED SOLUTION

Accepted Solutions
BCBuizer
Super User
Super User

Hi @aaronhowe ,

 

Referring to controls in a gallery won't work. in your data source you need to add a column per activity for the amount of hours which can be referenced from both inside and outside the gallery.



Did you like my post? Please give it a thumbs up! Did I resolve your issue? Please click Accept as Solution to close the topic and so other members of the community can find solutions more easily.

View solution in original post

2 REPLIES 2
BCBuizer
Super User
Super User

Hi @aaronhowe ,

 

Referring to controls in a gallery won't work. in your data source you need to add a column per activity for the amount of hours which can be referenced from both inside and outside the gallery.



Did you like my post? Please give it a thumbs up! Did I resolve your issue? Please click Accept as Solution to close the topic and so other members of the community can find solutions more easily.

Thank you!  I guess I need to think about how to patch the data back to the SharePoint list in an OnChange property, then reference it in the default text for the text field, then remove it once it's done... eesh.

 

It might be easier just to set an alert on the page for the user so they can't proceed until both fields have been manually entered 😂

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.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

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,730)