cancel
Showing results for 
Search instead for 
Did you mean: 

Clear data store on popup iView

Former Member
0 Kudos

Hello gurus,

I have a popup Iview that I call repeately. I compile values in a data store each time I click on a row from a table. The problem I'm having is that I want to clear out the data store values each time I call the form to start fresh. The data store is populated each time a row of the table is selected. I also want to prevent the row from being selected automatically when the popup form is opened.

I have two fields in my data store

1. selectnum

2. Vendorkey

On the select event of the table that goes to the data store, I put a formula in the Vendorkey field for Assigned Value:

IF(STORE@selectnum>1,'',IF(CONTAINS(STORE@Vendorkey,@Vendor_key),STORE@Vendorkey,STORE@Vendorkey&(IF(LEN(STORE@Vendorkey)>0,';',''))&@Vendor_key))

This checks if the rows have already been selected, if so assign blank.

Otherwise, assign the incoming Vendor_key value and keep adding to it each time I select a row, separating each value with a semi colon.

The formula is not working and I don't know why. I think the select event from the table is not incrementing the "selectnum" value, or something.

Any thoughts or better work arounds? Does VC have something like a form initialize event???

Thank you!

John

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

FOUND MY OWN ANSWER

Former Member
0 Kudos

Can u please help me in a similar type of requirement:

I have a table whose row is selected after a user clicks on any row in the table and submitted to another query .

I have avoided initial select using gaurd condition and a data store element( Gaurd condition-selectnumb>0, Datastore element- Selelctnumb=store@selectnumb+1) for submitting the row of table to query.

I have done the above setting as per the wiki at visual composer in SDN

But when i execute the report for first time by entering some input fields in the variable form of iview , it is working fine .But when i rerun the same the iview ...with different selection fields in the variable form of iview....the gaurd condition is not working and it is directly picking up the first row from the table.

I have found that the value for the first time in selectnumb is zero.But the value for selectnumb is 1 after first time running of report.this satisfies the gaurd condition and hence it is running the report with out selecting the row from table.( Here initial select is not avoided).

Can anyone please let me know how to clear the value of data store element selectnumb and make it zero everytime user submits the variable form.

Thanks

P.Navakanth