Hi There
I have 3 SharePoint cols:
Date Exposed - date/time (DC59) (ThisItem.'Exposure Date or Date of first test')
Iso Period - Choice 5,7,10,14 (DC66) (ThisItem.'Quarantine/Isolation Period(days)')
End Iso date - date/time (DC71) (ThisItem.'End Iso')
According to the selection in DC66, I need to add number of days to the "Date Exposed" field and save in ""End Iso date"
I am using the below formula in DC71 DefaultDate
If(ThisItem.'Quarantine/Isolation Period(days)'.Value = "5",DateAdd(DataCardValue59.SelectedDate,5,Days))......
I do not get any errors but nothing happens. I am also trying add multiple if statements for each value in DC66 using "&&", "Or" or ";"
Can you provide guidance of where I am going wrong?
KR
K
Solved! Go to Solution.
@KVarlowAre you trying to run this calculation when entering data (before saving it back to the SP list)?
In that case, the values selected won't be in the ThisItem object yet and you should use the datacard instead.
The formula would then be something like:
DateAdd(
DataCardValue59.SelectedDate,
Value(DataCardValue66.Selected.Value),
Days
)
Hi @KVarlow ,
Firstly the formula for the 'End Iso Date' could simply be
DateAdd(
DataCardValue59.SelectedDate,
Value(ThisItem.'Quarantine/Isolation Period(days)'.Value),
Days
)
Where are you using this and what else are you trying to add?
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.
Visit my blog Practical Power Apps
Hi Warren
I'm using this in a PA form for the SharePoint list.
So the formula above will cover all choices from the ' Quarantine/Isolation Period(days)' field in the Iso End date field?
I just added the formula to the DefaultDate field "End Iso date" and it just added the "Date Exposed" , ignoring the "Quarantine/Isolation Period(days". Myaybe I'm doing something wrong here. I need the End Iso Date = (Date exposed + Iso period)
Hi @KVarlow ,
Yes - assuming the 'Quarantine/Isolation Period(days)' field is a Choice field and all choices are numbers stored as Text.
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.
Visit my blog Practical Power Apps
Thankyou for the guidance but it still is just copying the "exposed date" into the field.
When you says "stored as text", what do you mean? 2 = Two
Hi @KVarlow ,
I was referring to your initial post where you are using
ThisItem.'Quarantine/Isolation Period(days)'.Value = "5"
which suggests it is a Choice column (in this type the choices are actually Text). Is this the case?
I copied a suggested formula from a forum, which used the quotes around the number.
Then I guess the choices are numbers so I shouldn't use the quotes
@KVarlowAre you trying to run this calculation when entering data (before saving it back to the SP list)?
In that case, the values selected won't be in the ThisItem object yet and you should use the datacard instead.
The formula would then be something like:
DateAdd(
DataCardValue59.SelectedDate,
Value(DataCardValue66.Selected.Value),
Days
)
Whoa!
Works a treat
Thankyou all for your feedback.
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
User | Count |
---|---|
183 | |
46 | |
46 | |
34 | |
33 |
User | Count |
---|---|
255 | |
86 | |
78 | |
68 | |
67 |