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

Announcements

News and Announcements icon
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 182
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:
  • Suggested answer
    Daniel Bocklandt Profile Picture
    5,151 Super User 2026 Season 1 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
    182 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,151 Super User 2026 Season 1 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
    182 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,151 Super User 2026 Season 1 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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 248 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 192 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 135

Last 30 days Overall leaderboard