Context("View") is not working in Virtual column

I added the below expression in Virtual Column.

Context(โ€œViewโ€) is giving blank result. I need to execute different expressions based on View.

Any suggestions would be great

0 8 661
8 REPLIES 8

Hi ,
Could you please test it in the view itself. May be with another test VC and simpler expression. In your current testing, in the test condition, is it possible that the pre-condition of view selection is not returning a status.

@Suvrutt_Gurjar : yes, Iโ€™ve tried that also. I have written simple if condition and print simple string then also itโ€™s not working. Iโ€™ve double checked with both IF and IFS. In IFS,itโ€™s going with true statement and for if it always went to else statement. For normal columns same expression is working. Only for VC, itโ€™s not working.

I also printed only Context(โ€œViewโ€) in VC but it gives blank output.

Hi @rrhirani,

Thanks for update that you are using it in printing. I presume you mean printing thru workflows? I am unsure about VCs being printed based on CONTEXT () functions.

Do normal columns print based on CONTEXT () functions?

Someone else may guide you. I am sorry that I am not in front of editor currently so that I am unable to test.

@Suvrutt_Gurjar : Not exact Printing. I meant display Column string in Deck view (As secondary header) .

Steve
Platinum 4
Platinum 4

A virtual columnโ€™s value is only updated/recomputed at the following times:

  • When a sync occurs, either in the foreground or in the background; or
  • Any time a column value is changed while editing a row.

Thatโ€™s it. The virtual column value is not recomputed as the user moves between views. Consequently, your expression remains what it was when the user last synced. If the row wasnโ€™t visible during the sync, the row had no context.

Thanks @Steve for your detailed answer. So I need to create 2 VCs for 2 different equations and need to display that column in Slice. This is the only option I have right?

Iโ€™d need to have a better understanding of what youโ€™re trying to accomplish to provide further guidance.

@Steve : I wanted to display โ€œ123โ€ for View โ€œAโ€ and โ€œ456โ€ for View โ€œBโ€
So I had written

IF(Context(โ€œViewโ€)=โ€œAโ€,โ€œ123โ€,โ€œ456โ€)

and It was not working it was showing 456 in both views.

So now I created two VCs and in 1st VC, I placed โ€œ123โ€ and show that column in View โ€œAโ€ and in 2nd VC, I placed โ€œ456โ€ and show that column in View โ€œBโ€

Itโ€™s working fine now.

@Steve : I am facing one major blocker. It will be great if you can give me some ideas regarding this issue. https://community.appsheet.com/t/new-bug-encountered-column-app-formula-working-in-editor-but-not-in...

Top Labels in this Space