cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
notj
Post Prodigy
Post Prodigy

Set Primary Field value to another field without Flow?

I'm building a model-driven app.

I'm wanting to set the Primary Field of some records to equal the text label of a selected lookup value. Since we can't make the Primary Field be a calculated value, I thought a business rule might do it but I'm confused how to update the value of one field with the value of another. 

I'd prefer not to have to do this in Power Automate if possible.

1 ACCEPTED SOLUTION

Accepted Solutions
v-xida-msft
Community Support
Community Support

Hi @notj ,

Do you want to update a field with value of another field in same record?

 

Regarding the needs that you mentioned, I think the Business Rule could achieve your needs. On your side, you could consider create a Business Rule for CDS Entity which is related to your Model-Driven app as below:

2.JPG

 

More details about creating Business Rule for Enty forms, please check the following article:

https://docs.microsoft.com/en-us/powerapps/maker/model-driven-apps/create-business-rules-recommendat...

 

In addition, I also think the Workflow could also achieve your needs. More details about creating a workflow for a CDS Entity, please check the following article:

https://docs.microsoft.com/en-us/power-automate/workflow-processes

 

Regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
jlindstrom
Super User
Super User

You may be able to use business rule to do this, but I’m a fan of real time workflow for this kind of thing. Hold on and I will post a video showing how

v-xida-msft
Community Support
Community Support

Hi @notj ,

Do you want to update a field with value of another field in same record?

 

Regarding the needs that you mentioned, I think the Business Rule could achieve your needs. On your side, you could consider create a Business Rule for CDS Entity which is related to your Model-Driven app as below:

2.JPG

 

More details about creating Business Rule for Enty forms, please check the following article:

https://docs.microsoft.com/en-us/powerapps/maker/model-driven-apps/create-business-rules-recommendat...

 

In addition, I also think the Workflow could also achieve your needs. More details about creating a workflow for a CDS Entity, please check the following article:

https://docs.microsoft.com/en-us/power-automate/workflow-processes

 

Regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

As per the previous posts, you could either use a Business Rule, or a real-time workflow (which doesn't use Power Automate). There's not a lot to chose between either approach, but there are a few differences:

  • With business rules, you can choose the scope; i.e. whether it only runs on certain forms, or entity-level scope. If you want this to run for all scenarios (including records created or modified outside of a form), then you'll need entity-level scope
  • With real-time workflows you have different control on when it triggers - e.g. on Create, on Update of fields (in this case, the lookup field). You can also set it to run on-demand, which may be useful to run for existing records

Overall, I'd go for a real-time workflow, partly out of habit, but also so I can run it on-demand, but I expect either option would work for your scenario

@v-xida-msft   That worked. I was trying that before but I didn't realize my Primary text field would only take other text fields. 

 

@DavidJennaway thanks, I didn't see that scope option up there. That definitely makes it more useful. 

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Users online (68,694)