Announcements
Hi!
Depending on the value of a field, I need the form to be displayed in view mode, otherwise in edit mode.I have the following statement in the OnEdit property of the SharepointIntegration but it only works for me when I double click the edit option of the sharepoint for the selected element.
Someone can help me!
Regards
Hello @dalgi24
Don't put your code there.
On your SharePointForm1's DisplayMode Property you can set it to like
If(DataCardValue_Estado.Selected.Value="Cerrado"; DisplayMode.View; DisplayMode.Edit)
Hi @dalgi24,
You should modify your formula as below:
If(SharePointIntegration.Selected.Status.Value="Red",ViewForm(SharePointForm1),EditForm(SharePointForm1))
In addition, @cha_cha , nerither SharePointForm1 nor SharepointIntegration has DisplayMode property.
Hi @v-qiaqi-msft
Thank you for correcting it. @dalgi24 please use @v-qiaqi-msft's code.
Thanks @v-qiaqi-msft ,
I made the adjustment but the behavior is the same, if it is in a closed state and I click on Edit it is displayed in edition mode, when clicking again it is displayed in view mode.
¿Am I doing something wrong? I need the first click to display in the corresponding mode
Show me you formula.
I have tested on my side, and I edit the record as below:
Hi @v-qiaqi-msft ,
This is the formula:
Yes, it is edited as you indicate. When running it looks like this
It should be in view mode as the status (estado) indicates closed (cerrado).
Best 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.
Congratulations to our community stars!
Expanding mentorship, skilling, and AI innovation
These are the community rock stars!
Stay up to date on forum activity by subscribing.
11manish 342 Super User 2026 Season 2
M Bilal Khan 258
Mohsin Ali 231