Re: [topbraid-users] Incrementing counter

2016-07-24 Thread Holger Knublauch
In addition to what Ralph suggested, you may want to look at the SWP 
element ui:setGlobalVar and its companion function ui:globalVarValue.


Holger


On 23/07/2016 0:37, pamar...@gmail.com wrote:

Hello,

I'm trying to increment a counter inside a forEach loop in a JSONService 
created using SWP.

I used . Then completed my other 
tasks, then closed the ui:group.

When I check the value of ?someCount, it never changes.

How can I increment a counter inside a forEach loop?

-Paula
Sent from my iPhone



--
You received this message because you are subscribed to the Google Group "TopBraid 
Suite Users", the topics of which include the TopBraid Suite family of products and 
its base technologies such as SPARQLMotion, SPARQL Web Pages and SPIN.
To post to this group, send email to topbraid-users@googlegroups.com
--- 
You received this message because you are subscribed to the Google Groups "TopBraid Suite Users" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to topbraid-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [topbraid-users] Incrementing counter

2016-07-23 Thread Paula Markes
Thanks Irene! That is good to know.  The images from Ralph also helped me get 
to the right spot for the info.

Thank you both for your assistance.
-Paula


> On Jul 22, 2016, at 1:55 PM, Irene Polikoff <ir...@topquadrant.com> wrote:
> 
> In TBC help, navigate to TopBraid Composer 
> <http://127.0.0.1:63733/help/nav/2> > Reference 
> <http://127.0.0.1:63733/help/nav/2_14> > SPARQL Property Functions
> 
> Links don’t work, because the port may be different for different machines.
> 
> Regards,
> 
> Irene Polikoff
> 
> From: Paula Markes <pamar...@gmail.com <mailto:pamar...@gmail.com>>
> Reply-To: <topbraid-users@googlegroups.com 
> <mailto:topbraid-users@googlegroups.com>>
> Date: Friday, July 22, 2016 at 1:17 PM
> To: <topbraid-users@googlegroups.com <mailto:topbraid-users@googlegroups.com>>
> Subject: Re: [topbraid-users] Incrementing counter
> 
> Thank you, Ralph!  I will look into all these options and see what will work 
> for me.
> 
> The last link though, doesn’t work.  Is it a specific section that you can 
> point out where I might find the info on tops:for?
> 
> Thanks again for the info.
> -Paula
> 
>> On Jul 22, 2016, at 12:37 PM, Ralph TQ [Gmail] <rhodg...@topquadrant.com 
>> <mailto:rhodg...@topquadrant.com>> wrote:
>> 
>> A ui:call to a select template allows you to set a variable name for an 
>> index. See http://uispin.org/ui.html#forEach: 
>> <http://uispin.org/ui.html#forEach:>
>> 
>>  As an optional argument of ui:forEach, the name of an index variable 
>> can be provided using ui:indexVar. The value of this variable will be the 
>> iteration counter, starting with 0.
>> 
>> 
>> There is also a “tops:for” function you could possibly use:
>> 
>> tops:for
>> This property can be used to implement loops over a range of integer values.
>>  
>> Syntax: ?index tops:for ( [startIndex] [endIndex] )
>> Description: The function iterates over all xsd:integer values >= startIndex 
>> and <= endIndex and assigns all those values to the variable on the left side
>> Example: In the following query, the variable index will be bound to the 
>> xsd:integer values 2, 3, and 4.
>> ?index tops:for (2 4)
>> See the TBC Help File - section at 
>> http://127.0.0.1:65443/help/topic/org.topbraidcomposer.core/html/SPARQL_Property_Functions.htm?cp=2_14_4
>>  
>> <http://127.0.0.1:65443/help/topic/org.topbraidcomposer.core/html/SPARQL_Property_Functions.htm?cp=2_14_4>
>> 
>> 
>> 
>>> On Jul 22, 2016, at 10:37 AM, pamar...@gmail.com 
>>> <mailto:pamar...@gmail.com> wrote:
>>> 
>>> Hello, 
>>> 
>>> I'm trying to increment a counter inside a forEach loop in a JSONService 
>>> created using SWP. 
>>> 
>>> I used . Then completed my 
>>> other tasks, then closed the ui:group. 
>>> 
>>> When I check the value of ?someCount, it never changes. 
>>> 
>>> How can I increment a counter inside a forEach loop?
>>> 
>>> -Paula
>>> Sent from my iPhone
>>> 
>>> -- 
>>> You received this message because you are subscribed to the Google Group 
>>> "TopBraid Suite Users", the topics of which include the TopBraid Suite 
>>> family of products and its base technologies such as SPARQLMotion, SPARQL 
>>> Web Pages and SPIN.
>>> To post to this group, send email to topbraid-users@googlegroups.com 
>>> <mailto:topbraid-users@googlegroups.com>
>>> --- 
>>> You received this message because you are subscribed to the Google Groups 
>>> "TopBraid Suite Users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send an 
>>> email to topbraid-users+unsubscr...@googlegroups.com 
>>> <mailto:topbraid-users+unsubscr...@googlegroups.com>.
>>> For more options, visit https://groups.google.com/d/optout 
>>> <https://groups.google.com/d/optout>.
>> 
>> 
>> -- 
>> You received this message because you are subscribed to the Google Group 
>> "TopBraid Suite Users", the topics of which include the TopBraid Suite 
>> family of products and its base technologies such as SPARQLMotion, SPARQL 
>> Web Pages and SPIN.
>> To post to this group, send email to topbraid-users@googlegroups.com 
>> <mailto:topbraid-users@googlegroups.com>
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "TopBraid Suite Users" 

Re: [topbraid-users] Incrementing counter

2016-07-22 Thread Irene Polikoff
In TBC help, navigate to TopBraid Composer
<http://127.0.0.1:63733/help/nav/2>  > Reference
<http://127.0.0.1:63733/help/nav/2_14>  > SPARQL Property Functions


Links don¹t work, because the port may be different for different machines.


Regards,


Irene Polikoff

From:  Paula Markes <pamar...@gmail.com>
Reply-To:  <topbraid-users@googlegroups.com>
Date:  Friday, July 22, 2016 at 1:17 PM
To:  <topbraid-users@googlegroups.com>
Subject:  Re: [topbraid-users] Incrementing counter

Thank you, Ralph!  I will look into all these options and see what will work
for me.

The last link though, doesn¹t work.  Is it a specific section that you can
point out where I might find the info on tops:for?

Thanks again for the info.
-Paula

> On Jul 22, 2016, at 12:37 PM, Ralph TQ [Gmail] <rhodg...@topquadrant.com>
> wrote:
> 
> A ui:call to a select template allows you to set a variable name for an index.
> See http://uispin.org/ui.html#forEach:
> 
> As an optional argument of ui:forEach, the name of an index variable can be
> provided using ui:indexVar. The value of this variable will be the iteration
> counter, starting with 0.
> 
> 
> There is also a ³tops:for² function you could possibly use:
> 
> tops:for
> This property can be used to implement loops over a range of integer values.
>  
> * Syntax: ?index tops:for ( [startIndex] [endIndex] )
> * Description: The function iterates over all xsd:integer values >= startIndex
> and <= endIndex and assigns all those values to the variable on the left side
> * Example: In the following query, the variable index will be bound to the
> xsd:integer values 2, 3, and 4.
> * ?index tops:for (2 4)
> See the TBC Help File - section at
> http://127.0.0.1:65443/help/topic/org.topbraidcomposer.core/html/SPARQL_Proper
> ty_Functions.htm?cp=2_14_4
> 
> 
> 
>> On Jul 22, 2016, at 10:37 AM, pamar...@gmail.com wrote:
>> 
>> Hello, 
>> 
>> I'm trying to increment a counter inside a forEach loop in a JSONService
>> created using SWP.
>> 
>> I used . Then completed my
>> other tasks, then closed the ui:group.
>> 
>> When I check the value of ?someCount, it never changes.
>> 
>> How can I increment a counter inside a forEach loop?
>> 
>> -Paula
>> Sent from my iPhone
>> 
>> -- 
>> You received this message because you are subscribed to the Google Group
>> "TopBraid Suite Users", the topics of which include the TopBraid Suite family
>> of products and its base technologies such as SPARQLMotion, SPARQL Web Pages
>> and SPIN.
>> To post to this group, send email to topbraid-users@googlegroups.com
>> --- 
>> You received this message because you are subscribed to the Google Groups
>> "TopBraid Suite Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to topbraid-users+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
> 
> 
> -- 
> You received this message because you are subscribed to the Google Group
> "TopBraid Suite Users", the topics of which include the TopBraid Suite family
> of products and its base technologies such as SPARQLMotion, SPARQL Web Pages
> and SPIN.
> To post to this group, send email to topbraid-users@googlegroups.com
> --- 
> You received this message because you are subscribed to the Google Groups
> "TopBraid Suite Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to topbraid-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.


-- 
You received this message because you are subscribed to the Google Group
"TopBraid Suite Users", the topics of which include the TopBraid Suite
family of products and its base technologies such as SPARQLMotion, SPARQL
Web Pages and SPIN.
To post to this group, send email to topbraid-users@googlegroups.com
--- 
You received this message because you are subscribed to the Google Groups
"TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to topbraid-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


-- 
You received this message because you are subscribed to the Google Group 
"TopBraid Suite Users", the topics of which include the TopBraid Suite family 
of products and its base technologies such as SPARQLMotion, SPARQL Web Pages 
and SPIN.
To post to this group, send email to topbraid-users@googlegroups.com
--- 
You received this message because you are subscribed to the Google Groups 
"TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to topbraid-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [topbraid-users] Incrementing counter

2016-07-22 Thread Paula Markes
Excellent!  Thank you!

-Paula


> On Jul 22, 2016, at 1:21 PM, Ralph TQ [Gmail]  
> wrote:
> 
> See screenshot of help menu:
> 
> 
> 
> 
> 
>> On Jul 22, 2016, at 1:17 PM, Paula Markes > > wrote:
>> 
>> Thank you, Ralph!  I will look into all these options and see what will work 
>> for me.
>> 
>> The last link though, doesn’t work.  Is it a specific section that you can 
>> point out where I might find the info on tops:for?
>> 
>> Thanks again for the info.
>> -Paula
>> 
>>> On Jul 22, 2016, at 12:37 PM, Ralph TQ [Gmail] >> > wrote:
>>> 
>>> A ui:call to a select template allows you to set a variable name for an 
>>> index. See http://uispin.org/ui.html#forEach: 
>>> 
>>> 
>>> As an optional argument of ui:forEach, the name of an index variable 
>>> can be provided using ui:indexVar. The value of this variable will be the 
>>> iteration counter, starting with 0.
>>> 
>>> 
>>> There is also a “tops:for” function you could possibly use:
>>> 
>>> tops:for
>>> This property can be used to implement loops over a range of integer values.
>>>  
>>> Syntax: ?index tops:for ( [startIndex] [endIndex] )
>>> Description: The function iterates over all xsd:integer values >= 
>>> startIndex and <= endIndex and assigns all those values to the variable on 
>>> the left side
>>> Example: In the following query, the variable index will be bound to the 
>>> xsd:integer values 2, 3, and 4.
>>> ?index tops:for (2 4)
>>> See the TBC Help File - section at 
>>> http://127.0.0.1:65443/help/topic/org.topbraidcomposer.core/html/SPARQL_Property_Functions.htm?cp=2_14_4
>>>  
>>> 
>>> 
>>> 
>>> 
 On Jul 22, 2016, at 10:37 AM, pamar...@gmail.com 
  wrote:
 
 Hello, 
 
 I'm trying to increment a counter inside a forEach loop in a JSONService 
 created using SWP. 
 
 I used . Then completed my 
 other tasks, then closed the ui:group. 
 
 When I check the value of ?someCount, it never changes. 
 
 How can I increment a counter inside a forEach loop?
 
 -Paula
 Sent from my iPhone
 
 -- 
 You received this message because you are subscribed to the Google Group 
 "TopBraid Suite Users", the topics of which include the TopBraid Suite 
 family of products and its base technologies such as SPARQLMotion, SPARQL 
 Web Pages and SPIN.
 To post to this group, send email to topbraid-users@googlegroups.com 
 
 --- 
 You received this message because you are subscribed to the Google Groups 
 "TopBraid Suite Users" group.
 To unsubscribe from this group and stop receiving emails from it, send an 
 email to topbraid-users+unsubscr...@googlegroups.com 
 .
 For more options, visit https://groups.google.com/d/optout 
 .
>>> 
>>> 
>>> -- 
>>> You received this message because you are subscribed to the Google Group 
>>> "TopBraid Suite Users", the topics of which include the TopBraid Suite 
>>> family of products and its base technologies such as SPARQLMotion, SPARQL 
>>> Web Pages and SPIN.
>>> To post to this group, send email to topbraid-users@googlegroups.com 
>>> 
>>> --- 
>>> You received this message because you are subscribed to the Google Groups 
>>> "TopBraid Suite Users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send an 
>>> email to topbraid-users+unsubscr...@googlegroups.com 
>>> .
>>> For more options, visit https://groups.google.com/d/optout 
>>> .
>> 
>> 
>> -- 
>> You received this message because you are subscribed to the Google Group 
>> "TopBraid Suite Users", the topics of which include the TopBraid Suite 
>> family of products and its base technologies such as SPARQLMotion, SPARQL 
>> Web Pages and SPIN.
>> To post to this group, send email to topbraid-users@googlegroups.com 
>> 
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "TopBraid Suite Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to topbraid-users+unsubscr...@googlegroups.com 
>> .
>> For more options, visit https://groups.google.com/d/optout 
>> .
> 
> 
> -- 
> You received this message because you are subscribed to the Google Group 
> "TopBraid Suite Users", the topics of which include the TopBraid Suite family 
> of products and its 

Re: [topbraid-users] Incrementing counter

2016-07-22 Thread Paula Markes
Thank you, Ralph!  I will look into all these options and see what will work 
for me.

The last link though, doesn’t work.  Is it a specific section that you can 
point out where I might find the info on tops:for?

Thanks again for the info.
-Paula

> On Jul 22, 2016, at 12:37 PM, Ralph TQ [Gmail]  
> wrote:
> 
> A ui:call to a select template allows you to set a variable name for an 
> index. See http://uispin.org/ui.html#forEach: 
> 
> 
>   As an optional argument of ui:forEach, the name of an index variable 
> can be provided using ui:indexVar. The value of this variable will be the 
> iteration counter, starting with 0.
> 
> 
> There is also a “tops:for” function you could possibly use:
> 
> tops:for
> This property can be used to implement loops over a range of integer values.
>  
> Syntax: ?index tops:for ( [startIndex] [endIndex] )
> Description: The function iterates over all xsd:integer values >= startIndex 
> and <= endIndex and assigns all those values to the variable on the left side
> Example: In the following query, the variable index will be bound to the 
> xsd:integer values 2, 3, and 4.
> ?index tops:for (2 4)
> See the TBC Help File - section at 
> http://127.0.0.1:65443/help/topic/org.topbraidcomposer.core/html/SPARQL_Property_Functions.htm?cp=2_14_4
>  
> 
> 
> 
> 
>> On Jul 22, 2016, at 10:37 AM, pamar...@gmail.com  
>> wrote:
>> 
>> Hello, 
>> 
>> I'm trying to increment a counter inside a forEach loop in a JSONService 
>> created using SWP. 
>> 
>> I used . Then completed my 
>> other tasks, then closed the ui:group. 
>> 
>> When I check the value of ?someCount, it never changes. 
>> 
>> How can I increment a counter inside a forEach loop?
>> 
>> -Paula
>> Sent from my iPhone
>> 
>> -- 
>> You received this message because you are subscribed to the Google Group 
>> "TopBraid Suite Users", the topics of which include the TopBraid Suite 
>> family of products and its base technologies such as SPARQLMotion, SPARQL 
>> Web Pages and SPIN.
>> To post to this group, send email to topbraid-users@googlegroups.com 
>> 
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "TopBraid Suite Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to topbraid-users+unsubscr...@googlegroups.com 
>> .
>> For more options, visit https://groups.google.com/d/optout 
>> .
> 
> 
> -- 
> You received this message because you are subscribed to the Google Group 
> "TopBraid Suite Users", the topics of which include the TopBraid Suite family 
> of products and its base technologies such as SPARQLMotion, SPARQL Web Pages 
> and SPIN.
> To post to this group, send email to topbraid-users@googlegroups.com
> --- 
> You received this message because you are subscribed to the Google Groups 
> "TopBraid Suite Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to topbraid-users+unsubscr...@googlegroups.com 
> .
> For more options, visit https://groups.google.com/d/optout 
> .

-- 
You received this message because you are subscribed to the Google Group 
"TopBraid Suite Users", the topics of which include the TopBraid Suite family 
of products and its base technologies such as SPARQLMotion, SPARQL Web Pages 
and SPIN.
To post to this group, send email to topbraid-users@googlegroups.com
--- 
You received this message because you are subscribed to the Google Groups 
"TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to topbraid-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [topbraid-users] Incrementing counter

2016-07-22 Thread Ralph TQ [Gmail]
A ui:call to a select template allows you to set a variable name for an index. 
See http://uispin.org/ui.html#forEach: 

As an optional argument of ui:forEach, the name of an index variable 
can be provided using ui:indexVar. The value of this variable will be the 
iteration counter, starting with 0.


There is also a “tops:for” function you could possibly use:

tops:for
This property can be used to implement loops over a range of integer values.
 
Syntax: ?index tops:for ( [startIndex] [endIndex] )
Description: The function iterates over all xsd:integer values >= startIndex 
and <= endIndex and assigns all those values to the variable on the left side
Example: In the following query, the variable index will be bound to the 
xsd:integer values 2, 3, and 4.
?index tops:for (2 4)
See the TBC Help File - section at 
http://127.0.0.1:65443/help/topic/org.topbraidcomposer.core/html/SPARQL_Property_Functions.htm?cp=2_14_4
 




> On Jul 22, 2016, at 10:37 AM, pamar...@gmail.com wrote:
> 
> Hello, 
> 
> I'm trying to increment a counter inside a forEach loop in a JSONService 
> created using SWP. 
> 
> I used . Then completed my 
> other tasks, then closed the ui:group. 
> 
> When I check the value of ?someCount, it never changes. 
> 
> How can I increment a counter inside a forEach loop?
> 
> -Paula
> Sent from my iPhone
> 
> -- 
> You received this message because you are subscribed to the Google Group 
> "TopBraid Suite Users", the topics of which include the TopBraid Suite family 
> of products and its base technologies such as SPARQLMotion, SPARQL Web Pages 
> and SPIN.
> To post to this group, send email to topbraid-users@googlegroups.com
> --- 
> You received this message because you are subscribed to the Google Groups 
> "TopBraid Suite Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to topbraid-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Group 
"TopBraid Suite Users", the topics of which include the TopBraid Suite family 
of products and its base technologies such as SPARQLMotion, SPARQL Web Pages 
and SPIN.
To post to this group, send email to topbraid-users@googlegroups.com
--- 
You received this message because you are subscribed to the Google Groups 
"TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to topbraid-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[topbraid-users] Incrementing counter

2016-07-22 Thread pamarkes
Hello, 

I'm trying to increment a counter inside a forEach loop in a JSONService 
created using SWP. 

I used . Then completed my other 
tasks, then closed the ui:group. 

When I check the value of ?someCount, it never changes. 

How can I increment a counter inside a forEach loop?

-Paula
Sent from my iPhone

-- 
You received this message because you are subscribed to the Google Group 
"TopBraid Suite Users", the topics of which include the TopBraid Suite family 
of products and its base technologies such as SPARQLMotion, SPARQL Web Pages 
and SPIN.
To post to this group, send email to topbraid-users@googlegroups.com
--- 
You received this message because you are subscribed to the Google Groups 
"TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to topbraid-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.