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.

View solution in original post

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
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (3,328)