cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
BHS_KI
Frequent Visitor

Assign a value to a DataCardValue Field

Hi there,

I tried to assign a value to a DataCardValue (binded DataCard in a Form). This field is a primary Index (connected to another table), but user should not add it manually when the form generates a new(Form1).

 

I really do not know how to do. my try was like this:

 

New(Form1);

DataCardValueXX = var_primekey

 

But I cannot assign the value. No idea why. 

 

Please help 🙂 Thank you so much,

Klaus

1 ACCEPTED SOLUTION

Accepted Solutions
BHS_KI
Frequent Visitor

yes, it matches. I made a workaround now.

Solution is: ulock the DataCardValue and set defaut to 

If(Form1.Mode=1;glbProject.ProjectNo;Parent.Default)
 
glbProject.ProjectNo is a Variable with the prime_key

View solution in original post

4 REPLIES 4
Nogueira1306
Community Champion
Community Champion

Try this: DataCardValueXX.Text = var_primekey

Or, write on the default property of that datacard the variable

 

Think it will work and, instead of making a new form, just reset it.

 

If you need additional help please tag me in your reply and please like my reply.
If my reply provided you with a solution, pleased mark it as a solution ✔️!

Best regards,
Gonçalo Nogueira

Check my LinkedIn!

Check my User Group (pt-PT)!

Last Post on Community

This does not work. 

zmorek
Super User
Super User

Does the column type of the data source match the value you're attempting to assign it?

BHS_KI
Frequent Visitor

yes, it matches. I made a workaround now.

Solution is: ulock the DataCardValue and set defaut to 

If(Form1.Mode=1;glbProject.ProjectNo;Parent.Default)
 
glbProject.ProjectNo is a Variable with the prime_key

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Power Apps Community Call Jan. 2022 768x460.png

Power Apps Community Call

Please join us on Wednesday, January 19th, at 8a PDT. Come and learn from our amazing speakers!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (2,229)