Hi, I need help, been struggling to identify any syntax error.
I have a text input (TextInput1) which lookup the number of months from user selection.
From there I would like to calculate the next eligible date for the user to exchange the item. The next eligible exchange date is calculated based on user lastissueddate + textInput1
On the Next Eligible Exchange Date date picker, I am trying to set the default date to DateAdd(lastissueddate .SelectedDate, Value(TextInput1.Text), Months). However, it keep receive There is an error in this formula. But I can't the error.
can anyone help me?
Solved! Go to Solution.
Check out the definelifespan control/card. Something in its Default is using creating a loop with DataCardValue153:
One is calculating off of the other, and then that one is calculating off the first one.
Can you share the error message? It's not clear from the info so far what is causing the problem for you.
Bryan
Hi Bryan,
The error message is
Hmm, the error message didn't tell us much. I can get a statement very similar to yours to work on my own test app, so there is no problem with your syntax.
Could you re-type your code, allowing the Intellisense feature to autofill as much of the expression as possible? Sometimes this helps Power Apps correctly reference the values from the controls.
not sure this message able to help?
@David0094 wrote:
not sure this message able to help?
That message definitely points to a problem. It looks like you are putting your code in the default property of this control and it is conflicting with the default date in the card numbered 153 - they refer to each other and are trying to calculate off of one another. You could edit the DefaultDate on DataCardValue153 so that it refers to something else, such as Today() or another date from a data source.
Sorry, I am not understand. I checked the control. I have put my code into default date of DataCardValue153 coz I want to display next eligible date to the user.
I should put the code somewhere else?
Check out the definelifespan control/card. Something in its Default is using creating a loop with DataCardValue153:
One is calculating off of the other, and then that one is calculating off the first one.
Hi Bryan, thanks for the advice and found mistake. I have recode and now can calculate the date 😀
@David0094 wrote:
Hi Bryan, thanks for the advice and found mistake. I have recode and now can calculate the date 😀
Great to hear - can you share what worked for you and Accept as Solution on the appropriate post? That helps others with similar issues find a solution too.
User | Count |
---|---|
253 | |
106 | |
88 | |
51 | |
43 |