cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Community Champion
Community Champion

Re: Automatically put an email inside of my collection

Thanks @TimoMigchielsen ,

The syntax is correct to add another item to a Collection.

Without seeing your data model, I cannot comment further, but if this works, it is the right direction.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

 

 

Highlighted
Post Prodigy
Post Prodigy

Re: Automatically put an email inside of my collection

I know it is correct... But I need the datacardvalue17_2 to be added automatically
Highlighted
Community Champion
Community Champion

Re: Automatically put an email inside of my collection

Ok @TimoMigchielsen ,

I get even more confused here, you ask if something will work, I agree and then you say it is not what you want.

I have not got my mind completely around your model, but you simply need to run the collection at the point the data is available (maybe screen OnVisible)

Highlighted
Post Prodigy
Post Prodigy

Re: Automatically put an email inside of my collection

Sorry for not explaining it good enough.

 

The code I sent on the second page of this post is to add emails by hand. These emails are stored inside of mypeople. I now need to add to the onvisible:

 

I need to add the value of datacardvalue17_2 to be automatically added (it will be an email) 

Highlighted
Community Champion
Community Champion

Re: Automatically put an email inside of my collection

OK @TimoMigchielsen ,

Is DateCard17_2 completed with a value when you enter the screen? If so, you can put the code in the OnVisible of the Screen.

I would also highly encourage you to rename your controls - at least the ones you refer to to something reflecting their contents - it will save you a lot of time and stop a lot of errors.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

 

 

Highlighted
Post Prodigy
Post Prodigy

Re: Automatically put an email inside of my collection

Yeah it will indeed have a value already when being on that screen. I just don't know how to code it to put it inside of my MyPeople collection. @WarrenBelz 

Highlighted
Community Champion
Community Champion

Re: Automatically put an email inside of my collection

@TimoMigchielsen ,

Add the mail in the Mail address - the rest should not matter

Collect(
   MyPeople;           
   {
      DisplayName: ZoekenNaarEmails.Text; 
      UserPrincipalName: ZoekenNaarEmails.Text; 
      Mail: datacardvalue17_2.Text
   }
);;           
Reset(ZoekenNaarEmails)

 

Highlighted
Post Prodigy
Post Prodigy

Re: Automatically put an email inside of my collection

Sorry, I don't think you know what I mean. I still get (0). It still doesn't put the email in there. 

https://gyazo.com/546e316fa9198a7795cb09265a9ace87

When I click on the first button, it should take the email from datacardvalue17_2 and automatically fill that in there, so it looks like this: https://gyazo.com/e9acd14d88a6e1ac4ba4e2dc73a7b6da

@WarrenBelz 

Highlighted
Community Champion
Community Champion

Re: Automatically put an email inside of my collection

@TimoMigchielsen ,

Can you please show me what is in DataCard Value17_2

Also an you please go to View > Collections > MyPeople and show me the structure of this as well as the code you use to collect it.

This really should not be that hard.

Highlighted
Post Prodigy
Post Prodigy

Re: Automatically put an email inside of my collection

@WarrenBelz 

This is what is inside of datacardvalue17_2. It auto takes the emailadres. 
https://gyazo.com/a858bae393a0412c7ca8ae9af10a190c

Here is the collection MyPeople:
https://gyazo.com/1b12bd2b578204dbce9c103664b42f12

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (7,220)