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 652
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