Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
b_garside
Partner - Specialist
Partner - Specialist

show one record out of many in a text box

I was wondering if there is a way to cycle through records via variable and display it in a text box. Im using it for a form view with many text boxes showing various fields. But If can do it on one I can replicate it to the others.

This is the start of the expression. Not sure how to pull this off.

=If(CountryID=vCountryID,Concat(Country, '|') )

1 Solution

Accepted Solutions
hic
Former Employee
Former Employee

Assuming that you have a variable vCountryID that contains country ID, you could do the following:

     =Concat(distinct If(CountryID='$(vCountryID)', Country), '|')

HIC

View solution in original post

7 Replies
chiru_thota
Specialist
Specialist

Try this

=trim(SubField(concat(CountryName,',',8),',',1))

hic
Former Employee
Former Employee

Assuming that you have a variable vCountryID that contains country ID, you could do the following:

     =Concat(distinct If(CountryID='$(vCountryID)', Country), '|')

HIC

kumarnatarajan
Partner - Specialist
Partner - Specialist

Hi,

Use Henric post it will work.

Else

try below

Concat({<CountryID={"$(vCountryID)"}>} distinct Country,'|')

b_garside
Partner - Specialist
Partner - Specialist
Author

Thank you so much HIC !

Now the only thing to I need to do is set a Min/Max constraint on the variable so the user can page through without issue.

b_garside
Partner - Specialist
Partner - Specialist
Author

How would I return the Max record ID in this String expression if the user chooses to go past it?

the last part wont work

=If(vCountryID < max(vCountryID) , '$(vCountryID)'+1 , max(CountryID)  )

b_garside
Partner - Specialist
Partner - Specialist
Author

This is for a button using a variable action to increase the variable value.

b_garside
Partner - Specialist
Partner - Specialist
Author

figured it out. Very much like set analysis.

=If(vCountryID < max(vCountryID) , '$(vCountryID)'+1 , $(=max(CountryID)) )