cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
TheRealFlori
Helper I
Helper I

Combine Collection in one OnSelect

Hi Together,

 

i am trying to create a collection with calculated time Values right now. But I'm not sure if i can make this in one OnSelect.

 

I need to create a collection and then add calculated values on it.

 

My OnSelect right now:

ClearCollect(INC; Incident_Gallery.Selected.ID)

 

What i aspect in my OnSelect:

ClearCollect(INC; Incident_Gallery.Selected.ID);
AddColumns(
	INC; 
		"B"; 
			DateDiff
			(
				Incident_Gallery.Selected.Benachrichtigungszeit_Anfang; Incident_Gallery.Selected.Benachrichtigungszeit_Ende; Minutes
			); 
		"L"; 
			DateDiff
			(
				Incident_Gallery.Selected.Störungsbehebung_Anfang; Incident_Gallery.Selected.Störungsbehebung_Ende; Minutes
			); 
		"R"; 
			DateDiff
			(
				Incident_Gallery.Selected.Rückkehr_zu_Normalbedingungen_Anfang; Incident_Gallery.Selected.Rückkehr_zu_Normalbedingungen_Ende; Minutes
			)
	)

Can i combine these Collection options?

 

Does someone has a hint for me?

 

Thanks and Regards

Florian

1 ACCEPTED SOLUTION

Accepted Solutions
v-yutliu-msft
Community Support
Community Support

Hi @TheRealFlori ,

Do you want to a collection with calculated time Values by clicking a button?

Actually, you do not need to firstly save this "Incident_Gallery.Selected.ID" in collection, you could use "Incident_Gallery.Selected.fieldname" directly.

The syntax of ClearCollect is:

ClearCollect(collectionname,{fieldname1:value,fieldname2:value,....})

Try to set the OnSelect to this formula:

ClearCollect(INC; 
             {B:DateDiff
			(
				Incident_Gallery.Selected.Benachrichtigungszeit_Anfang; Incident_Gallery.Selected.Benachrichtigungszeit_Ende; Minutes
			);
               L:DateDiff
			(
				Incident_Gallery.Selected.Störungsbehebung_Anfang; Incident_Gallery.Selected.Störungsbehebung_Ende; Minutes
			); 
               R:DateDiff
			(
				Incident_Gallery.Selected.Rückkehr_zu_Normalbedingungen_Anfang; Incident_Gallery.Selected.Rückkehr_zu_Normalbedingungen_Ende; Minutes
			)
         }
        )

 

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-yutliu-msft
Community Support
Community Support

Hi @TheRealFlori ,

Do you want to a collection with calculated time Values by clicking a button?

Actually, you do not need to firstly save this "Incident_Gallery.Selected.ID" in collection, you could use "Incident_Gallery.Selected.fieldname" directly.

The syntax of ClearCollect is:

ClearCollect(collectionname,{fieldname1:value,fieldname2:value,....})

Try to set the OnSelect to this formula:

ClearCollect(INC; 
             {B:DateDiff
			(
				Incident_Gallery.Selected.Benachrichtigungszeit_Anfang; Incident_Gallery.Selected.Benachrichtigungszeit_Ende; Minutes
			);
               L:DateDiff
			(
				Incident_Gallery.Selected.Störungsbehebung_Anfang; Incident_Gallery.Selected.Störungsbehebung_Ende; Minutes
			); 
               R:DateDiff
			(
				Incident_Gallery.Selected.Rückkehr_zu_Normalbedingungen_Anfang; Incident_Gallery.Selected.Rückkehr_zu_Normalbedingungen_Ende; Minutes
			)
         }
        )

 

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @v-yutliu-msft 

 

you are right. It should do this by clicking on a selection in my Galery.

 

Your Idea worked. It looks like It is a bit to easy for my brain 😄

 

Thanks a lot!

 

Regards

Flo

Helpful resources

Announcements
October Events

Mark Your Calendars

So many events that are happening this month - don't miss out!

Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

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