cancel
Showing results for 
Search instead for 
Did you mean: 

Clearing previous data

swapnilkulkarni
Participant
0 Kudos

Hi All,

I have some VC models where I am displaying input form in one layer and after submit(Submit Form) I am displaying output layer. The problem i am facing is when user goes back to input screen by back button (History Back) and again enters different data what he sees in the output layer is previous run data until it is refreshed. I want to clear this previous data in output layer immediately when he clicks submit on first input layer.

Also can we make submit button 'default' so that when users selects all input variables and presses 'ENTER' the form should get submitted. I could not find any such property for the button.

Has anyone done this? please help me on this, this is a valid and a bit urgent requirement.....

Accepted Solutions (0)

Answers (4)

Answers (4)

former_member185086
Active Contributor
0 Kudos

Hi

I worked on same senirio and i solved this.

you want that : - Based on the input value chart and table are drawn once this input value is changed differerent chart and table comes .moreover once u pressed BACK button Nothing should be there specially in Output layer.

is it?

So u apply this concept in that back button that once You pressed it,it first clear the output layer and then come to input layer.

Let see

regards

Satish

swapnilkulkarni
Participant
0 Kudos

Hi Satish,

You got it correct. In first run users selects some input and presses submit to see output layer. Now he clicks on 'back' (history back) button to see previous input layer. He changes some parameters and submits to see 'previous' output layer containing graph and table data for previous selection until the data is reloaded from back end. Instead of this after pressing submit he should see blank chart and table and once data comes from back end it should get displayed.

I got the point to apply similar technique in blog to my 'Back' button on output layer. but the problem i am facing to 'Clear the output layer' is how should be graph cleared off the data and delete all the rows in table.

We can clear forms by storing blank values but to graph how should i clear the data it has?

If you have done this please advise me and correct my thinking if i am getting it wrong...

Also can you also let me know your thoughts about how can we make submit button get clicked when we press 'Enter'? Usually in HTML and other UI techs we make it 'default' so that it gets clicked when we press enter key....

waiting for your reply...

Thanks in advance,

Swapnil

gerhard_lang
Explorer
0 Kudos

Hi Swapnil,

I solved this problem in my model by simply switchching the visibility of the whole layer when particular values are changed in the input layer.

On submitting the input data I stored the 'controlled' values in the data store (as 'old' values) and set the visibility of the layer to 'STORE@<old_value>==@<current value> and ...'. So even if the user changes the layer manually after changing input data without submitting the data, he sees an empty layer and no unexpected data.

On submitting the input this comparison gets 'true'and so the visibility. To delay the visibility until the new output data is here you would have to compare the current input value with the according value in the output layer additionally.

I clould imagine that this works for your configuration of layers as well. If not then maybe the use of a nesetd iView for the output layer could make things easier.

It took me a lot of trying with the clearing of certain output fields and many 32k errors on the way before I fled into this solution. When you have got not only one but several output layers the clearing is going to get real work.

Regards

Gerhard

swapnilkulkarni
Participant
0 Kudos

Hi Navneeth/Satish,

thanks for the useful link...

The blog explains how to clear a 'form' using trick of storing the 'fields' on it as ''(blank).

But my output layer has one graph and below that one table. After user presses submit on input layer he sees this previous graph and table which i need to CLEAR or make it blank.

any idea you suggest to clear the graph along with table?

former_member185086
Active Contributor
0 Kudos

Hi

You have to do a workaround based on this link that once you input the data after processing it this field will clear .

do workaround here that once u press BACK button output layer data vanished

apply same thing here.

/people/jarrod.williams/blog/2006/12/14/visual-composer-tips-and-tricks

Regards

Satish

Former Member
0 Kudos

Hi Swapnil

Please check out this link:-

/people/jarrod.williams/blog/2006/12/14/visual-composer-tips-and-tricks

Regards

Navneet