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
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 (6,067)