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.
Solved! Go to Solution.
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:
More details about creating Business Rule for Enty forms, please check the following article:
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,
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
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:
More details about creating Business Rule for Enty forms, please check the following article:
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,
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:
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.
User | Count |
---|---|
20 | |
10 | |
9 | |
5 | |
5 |
User | Count |
---|---|
32 | |
30 | |
18 | |
17 | |
7 |