cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
simms7400
Level 8

Re: Populate DataCard with Date (point in time) based on another DataCard selection

@v-xida-msft  Okay so a quick update!

 

The logic is working I just discovered:

If(
    AssetEditForm.Mode = FormMode.Edit && DataCardValue35.Selected.Value = "Terminated",
    Patch(
        rdAssets,
        LookUp(rdAssets, Name = DataCardValue53.Text),
        {
           Termination_Date: Text( Now(), "[$-en-US]mm/dd/yyyy" )
        }, {Portfolio_x0020_Status:  {ID:5,Value: "Terminated"}}
    )	
);

 

The problem is, when the Patch function runs, a new record appears in the form.  My thoughts are since I have a Submit function as well, its conflicting with that?

 

How do I run the Path function but then stay on the same record? As when I update to "Terminated" there are other required fields to fill out...

 

Thanks!

 

 

Highlighted
simms7400
Level 8

Re: Populate DataCard with Date (point in time) based on another DataCard selection

My OnSuccess property is this:

 

 

If(
	Not(IsBlank(PTPID)) && IsBlank(PTPID_OC),
		Patch(
			RD_Partnership_List,
			LookUp(RD_Partnership_List,Portfolio_ID=DataCardValue53.Text),
			{Portfolio_ID:Blank(),
			Portfolio_Alias:Blank()}
		)
);
Concurrent(UpdateContext({vTitle: ""}),
Navigate(SuccessMessage,ScreenTransition.None),
ResetForm(AssetEditForm),
Refresh(rdAssets),
Refresh(RD_Partnership_List))

 

Can I avoid running these when the patch within the Status field is executed? is that possible?

Helpful resources

Announcements
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

New Badges

Check it out!

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors
Users online (6,070)