---
title: "XPage custom control loading existing values into table"  
description: "XPage custom control loading existing values into table"  
author: "Anonymous User"  
published: 2013-06-20  
updated: 2013-06-20  
canonical: https://www.mindstick.com/forum/1253/xpage-custom-control-loading-existing-values-into-table  
category: "json"  
tags: ["json"]  
reading_time: 1 minute  

---

# XPage custom control loading existing values into table

Any help on above is really appreciated.\
I have an XPage with a [custom](https://www.mindstick.com/blog/12298/use-custom-writing-services-to-get-through-the-finals) [control](https://www.mindstick.com/blog/197/asp-dot-net-repeater-control) ccxGrid. In this custom control, it calls another XPage that [builds](https://yourviews.mindstick.com/view/81971/nasa-builds-whopping-23-million-toilet-at-iss) a JSON [string](https://www.mindstick.com/articles/1527/string-split-in-c-sharp) that in turn populates the [table](https://www.mindstick.com/articles/43918/how-to-design-table-using-bootstrap) on the main XPage. My issue is that when the page is refreshed the same [documents](https://www.mindstick.com/articles/156931/the-main-types-of-business-documents) are added to the table again and again. Is there a way to [check if](https://www.mindstick.com/forum/12878/how-to-check-if-an-asp-dot-net-file-upload-control-has-a-file-in-jquery) the [document](https://www.mindstick.com/articles/328642/what-to-consider-while-choosing-a-software-documentation-tool) is [already](https://yourviews.mindstick.com/view/88453/the-hidden-ways-ai-is-already-controlling-your-daily-life) in the table to not add it? Thanks in advance.

## Replies

### Reply by AVADHESH PATEL

Hi,\
Here's an answer based on my comment above. Use a viewScope variable that you set initially and [check](https://yourviews.mindstick.com/story/2248/never-forget-to-check-these-specifications-before-buying-a-mobile-phone) on every build of the JSON string:\
if (!viewScope.alreadyHandled) { viewScope.alreadyHandled = true;\
// Do your JSON string processing}


---

Original Source: https://www.mindstick.com/forum/1253/xpage-custom-control-loading-existing-values-into-table

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
