cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
sanderson82
Level: Powered On

Update a filtered gallery after item selected is processed

I'm currently working on a timesheet app pulling data from multiple SP lists (Employee, Contract, Tasks), entering hours per contract/task, adding to a collection, then patching to another SP list (Timesheets) for reporting.

 

I select the date then a supervisor name (filtered dropdown from Employee list where Role = Supervisor).  For now I have a gallery of employee names filtered by the selected supervisor drop down.

 

For each employee there may be multiple entries of contract, task and hours which I can handle ok, adding a record for each selected item in the gallery.

 

I would like to achieve one of the following.....

 

1) After all entries from the selected employee have been added, using a tick box or some sort of identification either made the selected user disappear from the list, or turn the gallery item red i.e. some sort of indication that that timesheet is complete

 

2) Hide the gallery, show the first employee on the filtered gallery list in a label / box box, enter in the timesheet information and have a "Next" button which changes to the next gallery item until all have been completed.

 

Many thanks for any help

 

Regards

 

Steven

3 REPLIES 3
v-yutliu-msft
Level 10

Re: Update a filtered gallery after item selected is processed

Hi @sanderson82 ,

According to your description, these two features cannot be implemented.

Could you describe more details about “After all entries from the selected employee have been added”?

How to justify all entries having been added?

It will be better if you could show me more about your app, like pictures, formulas, etc.

 

 

Best regards,

Community Support Team _ Phoebe Liu

sanderson82
Level: Powered On

Re: Update a filtered gallery after item selected is processed

Hi @v-yutliu-msft  thanks for your reply.  I have attached an image of the input screen and some details below

 

User first selects supervisor from the dropdown, this filters the gallery on the left (EmpList) with who is in that team.

 

For each selected person (selected name appears in red top middle of the screen) user selects contract and task from dropdowns and enters the amount of hours.  The red + icon adds to a collection which is also represented on the screen as a gallery. (code below)

 

Collect(TSheets,
    {
        Name: I_Name.Text,
        Date: I_Date.SelectedDate,
        Contract: Upper(I_Contract.Selected.Value),
        Task: I_Task.Selected.Value,
        Hours: Value(I_Hours.Text),
        Supervisor: Upper(I_Supervisor.Selected.Value)
    });
        Reset(I_Task); Reset(I_Hours)

 

Technically, if a selected persons hours equal 8 that is a full day, however they may do less that 8 hours in one day, 0 if they are absent, or more if there is overtime so I don't think I can use this value.

 

I'm trying to think of some sort of manual confirmation that just makes it clearer from that gallery on the left that all names have been accounted for, hence my theory of a tick box to change the colour of the gallery item.

 

Once user is happy that all members of the team have times added the submit button sends the collection to a sharepoint list

 

Collect(Timesheets,TSheets);Clear(TSheets);Navigate(Finish,Fade)

I track the total hours at the bottom and the value shows red if above the normal 8 hours per person

 

EmpCount

CountRows(EmpList.AllItems)

TargetHours

EmpCount.Text*8

 

Color

If(
    Value(ActualHours.Text) > Value(TargetHours.Text),
    Color.Red,Color.Black)

 

Hope this makes sense

 

Thanks

 

Steven

 

 

chrisog
Level 8

Re: Update a filtered gallery after item selected is processed

Hi @sanderson82 ,

 

I think I grasp the issue that you're having. You have a few possible scenarios that could solve this problem.

 

Firstly, you could have a tick-box on your form that indicates that this is the final entry for this person. For example, if the person has entered 2 jobs at 3 hours each but the second one is the final entry, they would tick the box to indicate that there will be no more entries for this person. 

You could then have your red + button have another function of an If statement, saying:

Collect(TSheets,
    {
        Name: I_Name.Text,
        Date: I_Date.SelectedDate,
        Contract: Upper(I_Contract.Selected.Value),
        Task: I_Task.Selected.Value,
        Hours: Value(I_Hours.Text),
        Supervisor: Upper(I_Supervisor.Selected.Value)
    }); 
If ( Checkbox1.Value = true , Collect ( FinalEntry , {Name : I_Name.Text , Final : true} ) ) ; Reset(I_Task); Reset(I_Hours)

 

This would create another collection only tracking whether the final entry has been completed for each person.

 

You could then have the font colour for your gallery on the left to be dependent of whether their name appears on that list with their Final value being true by setting the font colour property to:

If ( LookUp ( FinalEntry , I_Name = Name).Final = true , RGBA ( 255 , 0 , 0 , 1 ) , RGBA ( 0 , 0 , 0 , 1 ) )

 

Which would change the text to red when they have been marked as final entry.

 

Finally you could then have the submit button clear that collection when done.