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 Apps
Answered

datavalue

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hello all,

Its possible fill one field with the value of another field?

I created a edit form and I have two datacards

The first data card is "start date" and the user will select this value.

the second data card is "start date time".

In this card , the value of datavalue3 must be the same selected in the previous card without user action.

 

Tks1.jpg2.jpg

 

 

Categories:
I have the same question (0)
  • Verified answer
    v-yutliu-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

    Do you want to automatically fill in datetime datacard by using date and time in other fields?
    I've made a similar test for your reference:

    1)control for date field named DataCardValue19

    control for time field named Dropdown1, Dropdown2

    control for datetime field named DateValue1, HourValue1, MinuteValue1

    2)for date datacard

    set DataCardValue19's OnChange:

     

    Set(var1,true)

     

    3)for time datacard

    set Dropdown1's Items:

     

     

    ["00","01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23"]

     

     

    set Dropdown1's OnChange:

     

    Set(var2,true)

     

    set  Dropdown2's Items:

     

     

    ["00","01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31","32","33","34","35","36","37","38","39","40","41","42","43","44","45","46","47","48","49","50","51","52","53","54","55","56","57","58","59"]

     

     

    set Dropdown2's OnChange:

     

     

    Set(var3,true)

     

     

    set time datacard's Update:

     

     

    Dropdown1.Selected.Value&":"&Dropdown2.Selected.Value

     

     

    //I set time field as text type

    4)for datetime datacard(I set this field as datetime data type)

    DateValue1's DefaultDate:

     

    If(var1,DataCardValue19.SelectedDate,Parent.Default)

     

    HourValue1's Default:

     

    If(var2,Dropdown1.Selected.Value,Text(Hour(Parent.Default),"[$-en-US]00"))

     

    MinuteValue1's Default:

     

    If(var3,Dropdown2.Selected.Value,Text(Minute(Parent.Default),"[$-en-US]00"))

     

    //Then at the beginning controls in this datacard display as this item's data. If you make any change in date field or time field, data will be automatically filled inn datetime field.

    924.gif

     

     

    Best regards,

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hello @v-yutliu-msft 

    Many thanks for youtr reply an the time expent to answer my  question.

    I follow your instructins, but I have one error.
    The main field is related to a sql database and this datafield is ""Start_x0020_Date"".

     

    erro1.jpg

     

     

     

     

     

     

     

     

     

    I input the value in onseelct option ( In brasil we need use ";" as ",")

     

    erro2.jpg

    But when I try create de defaultdate setup in the second field the formaul contains an error.

    I miss one step or setup?

     

    erro3.jpg

    Regards

     

     

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @v-yutliu-msft 

    I just input this value 

    If(var1;DateValue1.SelectedDate;Parent.Default)

     

    and now its work fine

    many thanks

     

    regards

     

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 329 Most Valuable Professional

#2
11manish Profile Picture

11manish 209 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 179

Last 30 days Overall leaderboard