Context("ViewType") = "Form" -- Not honored in new desktop UX

Just noticed that today the Context("ViewType") = "Form" in the new desktop UX isn't be honored.

  • It was previously, so something in a recent release must have tweaked things.

 

 

Solved Solved
1 15 524
1 ACCEPTED SOLUTION


@Fabian_Weller wrote:

use LINKTOROW(key , "Any_Form_View")


I believe if you were to do this, it would work no matter what.  The rational being:

  • You're telling the system, "Leave where we are and go here."
  • That should work, no matter what - I would imagine.

_________________________________________________________________________________________

SOLUTION to Context("ViewType") = "Form" not working in new Desktop UX

Turns out there's a setting inside the "Edit" button that dictates whether Context("ViewType") = "Form" works or not - at least indirectly@Fabian_Weller you nailed it.

MultiTech_0-1704718250786.png

If you've got "Edit in place" turned on: then, as @borja1 mentioned, we're NOT technically inside the form... we're still inside the DETAIL view.  

  • So Context("ViewType") = "Form" would NOT be true - and this is EXACTLY what you would expect, though it does throw in more nuance into the control over when/where something is editable.

If you turn the "Edit" actions Desktop Behavior to "Open in form" you can avoid these problems

  • This will also give you the Form Save Event - which won't happen with edit in place. 😉

View solution in original post

15 REPLIES 15

Wow... which turns out is catastrophic for functionality

And just when I was telling everyone it's probably okay to start using the new UX experience. 

  • HA!  figures.

Cheers

 

It's working on my side, try without the double quotes inside CONTEXT()

Isn't working on  my side, neither with the quotes nor without them 😕

That's weird, it has never failed for me. Are you sure you are not using the Edit in place option?

Hi! Thanks for your response. To be honest, Im new to Appsheet so I am not dure if is in place. I'm using desktop view. What is for sure is, with the same configuration, when I click add the formula works, but when click edit it doesnt.

2023_10_30_09_05_11_Catálogo_Apps.png

if this is in place, how can I say that it shows up as regular form? If I cant, is there any viewtype that fit this desktop edit mode? (haven't seen anyone in the list)

Thanks and regards!


@borja1 wrote:

if this is in place, how can I say that it shows up as regular form? If I cant, is there any viewtype that fit this desktop edit mode? (haven't seen anyone in the list)

 


You are using the "Edit in place" mode, which is basically like the detail view with quick edits.

You can change the behaviour of the "Edit" action button from the editor.
Make sure you can see system views and actions.

Actions: The Essentials - AppSheet Help

Thank you!

I found where to change it. Is there anyway we could get the view type context as edit in place? We need it to show/hide certain property when is in form or edit in place. We could change the setting to show as form in edit but for desktop view (which this app is intented for) is far more pleasant and intuitive the in place edit.

Thanks and regards,

Nope at this point, it could be a thing to ask to them so that they can implement it but I don't think they will add new features until Desktop Mode reaches stable/production

@MultiTech @SkrOYC How would we do this when we use LINKTOROW(key , "Any_Form_View") ? I think right now this form view opens as "Edit in Place". How can we change this so that it opens as "Open a Form"? 


@Fabian_Weller wrote:

use LINKTOROW(key , "Any_Form_View")


I believe if you were to do this, it would work no matter what.  The rational being:

  • You're telling the system, "Leave where we are and go here."
  • That should work, no matter what - I would imagine.

_________________________________________________________________________________________

SOLUTION to Context("ViewType") = "Form" not working in new Desktop UX

Turns out there's a setting inside the "Edit" button that dictates whether Context("ViewType") = "Form" works or not - at least indirectly@Fabian_Weller you nailed it.

MultiTech_0-1704718250786.png

If you've got "Edit in place" turned on: then, as @borja1 mentioned, we're NOT technically inside the form... we're still inside the DETAIL view.  

  • So Context("ViewType") = "Form" would NOT be true - and this is EXACTLY what you would expect, though it does throw in more nuance into the control over when/where something is editable.

If you turn the "Edit" actions Desktop Behavior to "Open in form" you can avoid these problems

  • This will also give you the Form Save Event - which won't happen with edit in place. 😉

Thank you @MultiTech I think I understand what you mean. But we don't seem to have control over the "Desktop behavior" when using LINKTOROW().

In the Edit Action I've set the "Desktop Behavior" to "Open a form".

Fabian_Weller_0-1704804089955.png

And this is the LINKTOROW() Action:

Fabian_Weller_1-1704804127325.png

It opens the "Kalender_Slice_Form" as "Edit in place", not as "Open a form".

So it seems as we are not able to open a form view as "Open a form" when we use a LINKTOROW() Action.


@Fabian_Weller wrote:

It opens the "Kalender_Slice_Form" as "Edit in place", not as "Open a form".


I think I have something like this working somewhere, let me see what's happening there....

  • Okay I don't, but I can make a quick action to test...
  • And it opens in the form

🤔hmm... I'd report your situation to support as a bug.


@MultiTech wrote:

And it opens in the form


This is not working neither in my paid app, nor in my free test app.

So you enabled Desktop mode?

Fabian_Weller_0-1704819217196.png

This is my Navigation Action in my Test App:

Fabian_Weller_1-1704819302117.png

The Edit Action is set to "Open a form":

Fabian_Weller_3-1704819514537.png

But it opens as "Edit in place".

Fabian_Weller_2-1704819443475.png

@MultiTech can you confirm that in your case it is opening in a Form View?


@Fabian_Weller wrote:

Fabian_Weller_2-1704819443475.png


This is actually the form

  • When you have the new desktop UX turned on, and you're on a PC, this is how the form looks.

Oh sorry my fault. I just began to try out the new desktop UI 🙂

But it seems not to respect the form view in this case:
I have a VC that calculates a Ref List. But since this is an expensive SELECT() expression, I want it to be calculated only when the form view opens. (I learned this from you @MultiTech 😉)
So I use
IFS(CONTEXT("ViewType")="Form", SELECT(...))

This is working fine, but not in the new desktop UI. The Ref List is just blank. If I use the SELECT() expression without the IFS(CONTEXT("ViewType")="Form" the Ref List will show up in both - old and new desktop UI.

Top Labels in this Space