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

7 REPLIES 7

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.

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. 

Hi @notj - how did you end up solving the issue of setting the Primary text value to a non-text (lookup) field value? I'm having the exact same issue

I can't remember what app this was for, so I'm having trouble finding it. I think I used a few fields to contain all the data in the lookup field in separate fields, then I used a business rule to update the Primary text afterwards to one of these separated fields. 

So basically, a lookup field. Then a couple fields that have calculation business rules to be equal to lookupfield.name, lookupfield.phone, etc.

Then a rule that fires on creation to update the primary text with whichever one of those I needed. Hopefully that makes sense.

 

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Users online (4,958)