web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Variable doesnt make a...
Power Apps
Answered

Variable doesnt make a record

(0) ShareShare
ReportReport
Posted on by 95
Hello,
I am making a variable when I submit a form to use a date nad time (dataverse system column "created", hope I can use it for such purposes) and push it 1 year into the future so I can use it to assign  labels to the items listed Active/Inactive.
Variable is set up and pops no errors, but it doesnt make records in it. Its first time Im trying to use variables, there is something I dont get, thanks for help.
 
Button to submit form
Set(varExpdate; DateAdd(TimeValue(DataCardValue11.Text); 365; TimeUnit.Days);; "dd.mm.yyyy hh:mm");; SubmitForm(formPodminky_1);; Notify("Zaměstnanec proškolen";NotificationType.Success;10)
 
Text label in gallery
If(Today() > varExpdate; "Aktivní"; "Neaktivní")
Categories:
I have the same question (0)
  • Suggested answer
    Daniel Bocklandt Profile Picture
    5,117 Super User 2025 Season 2 on at
    Hey, 
     
    The created column Can't pe patched. This is a read only column. Maybe that's why it doesn't work. 
    It will probabmy not be possible to change it. 
     
    Try displaying the CreatedOn column in your app to see what Format it has. 
     
    If this solvede your porblem please accept it as solution so others can find it as well. 
    If it helped in any other way consider liking it so we can keep supporting eachother. 
  • JM-14081323-0 Profile Picture
    95 on at
    Hello,
    I dont want to patch it, only use its value+1 year for a variable record.
    I have it visible now, format is dd.mm.yyyy hh:mm
     
    on screenshot 1st date (system column CreatedOn 2nd date (system column ModifiedOn)
     
     
    Should I not use these and make my own columns but with same function?
  • Suggested answer
    Daniel Bocklandt Profile Picture
    5,117 Super User 2025 Season 2 on at
    Hey 
    I found the issue. 
    You try to format the date without the required Function try this: 
    Set(varExpected; Text(DateAdd(DateTimeValue(DataCardValue11.Text);365;TimeUnit.Days);"dd.mm.yyyy hh:mm"));;
    SubmitForm(formPodminky_1);; Notify("Zaměstnanec proškolen";NotificationType.Success;10)
     
    In the Label you need to change it to this: 
    If(Today() > DateTimeValue(varExpdate); "Aktivní"; "Neaktivní")
    You need to do this because the Format change makes the Date to a string so you need to convert it to a date again. 
     
    If this solvede your porblem please accept it as solution so others can find it as well. 
    If it helped in any other way consider liking it so we can keep supporting eachother. 
  • JM-14081323-0 Profile Picture
    95 on at
    Thank you a lot.
    Can you help me a bit further?
    I would need it to apply every time to a selected item only. Instead it applies for all of them now.
     
    Many thanks
     
  • Suggested answer
    Daniel Bocklandt Profile Picture
    5,117 Super User 2025 Season 2 on at
    Hey, 
     
    How would you like it to  be visible? 
    Only when it's selected? 
    Put in the textlabel Visible property this:
    ThisItem.IsSelected
    If this solvede your porblem please accept it as solution so others can find it as well. 
    If it helped in any other way consider liking it so we can keep supporting eachother. 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 765 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 272

Last 30 days Overall leaderboard