Flex Repeater Instances in the property shows Texts values but it doesn't show on the view

I am trying to show values for the instances with flex repeater and the path is given to another view. on that view I want to get values from the database and when binding the flex repeater instances to names query, I can see those values in the Instances properties and on the view, it showing for example - “Name 1” 3 times instead of different values which are coming from the database. I have a property bound that is used in the query to filter out the result.

Am I missing something in the design or is there any bug with Flex repeater? Because I tried all possibilities and went all Ignition articles but no fixes. Please suggest.

The Flex Repeater is working correctly in this regard, so it’s likely something is not set up correctly.

It sounds like you’re passing a unique parameter value to each instance of the Flex Repeater, with the expectation that the View being instanced will determine the View’s name based on a query.

In the following screenshot, I’ve set up a Flex Repeater with two instances which use the path of a View on which there is a param with a key of id. The instanced View has a Label which has a property binding which makes use of the View’s id param. Note that each instance has its own unique value for id, which is placed at the props.instances[x] level.

Make sure also that the param for the instanced View is set to be an “Input” param:

For your specific example, there are a couple of items which could be causing your issue:

  1. You are passing the same value to all three instances.
  2. You are not passing the param correctly, and so the View is falling back to the default value you’ve supplied; if the View is not supplied the params it expects, it falls back to the default value you’ve supplied (which I’m guessing is probably 1).
1 Like

@cmallonee Thank you for the quick response. I tried this method without query binding and it worked. But I am not able to figure it out with the database information. I have attached some of the screen captures.

I am trying to filter the books with an input text field with Author’s First name. I have a column container where I am going to show the Name of the book, Published year, Author’s name, and quantity in Stock, Label for each item. This view I am going to repeat in Tab View using Flex Repeater when the user wanted to find out about a specific author name. So, I am not understanding how I am going to bind instances with as per user input and because instances will not be constant, this will be bound with the query with parameter coming from the external text field.

Thank you.

-Ron

Everything you’ve posted looks fine except for the most important part, which you didn’t post!

Your Flex Repeater looks correct and has the correct data, so the fault must be in the binding on the View. In the View with the Column layout, you have a Label with a binding on props.text. That binding is what I need to see.

That binding should be against the view.params.title property.
Screen Shot 2020-05-27 at 7.49.42 AM

Thank you @cmallonee for your help. It worked as you suggested! :slightly_smiling_face: :+1:

@cmallonee one issue came up when I tried to show time on those Flex repeater and it is showing integer value ‘1,561,493,696,000’. When I bind this flexrepeater view (Column View) with a query I kept JSON settings so that I get instances from the database. is there any I can get values in this format “2020-05-12 10:02:40”?

Thank you.

  • Ron

The easiest way is going to be to cast that value by using an Expression. Assuming you’re using a Label to display this date and your View’s param is called t_stamp, configure your binding like so:

Bind Label.props.text to self.view.params.t_stamp.
Add an expression transform: toDate({value})

I tried this one too but it is giving me error. But if I put toDate({value},0), it is giving me a value in date and time format but it is like Fail-over Value which means constant value.

That’s because the default value you have for the Time param is a string (“value”) which the expression can’t cast to a date.

Consider changing the Time param to have a default date as a placeholder, or check the Overlay Opt-Out checkbox.

Applying that checkbox will result in the Label not displaying the overlay and will also result in the Label displaying null until the binding and transform are able to execute to completion. If you’d like the Label to display no value until a valid value is supplied, you could use the following setup:

Hi @cmallonee I configured this way, but this is configuration still not helping me what I am looking for.

It’s giving me repeated DateTime values on the Flex Repeater screen which is ‘2020-05-28 23:21:41’. Please let me know what I am missing in the config.

Thank you.

That’s what it’s giving you because that’s what your’re telling it to supply when an actual timestamp isn’t supplied.

Your Binding is interpreted as "Bind against view.params.Assigned_Date, but cast that value which could be almost anything as a Date type value. If casting fails, return a value of ‘2020-05-28 23:21:41’ ".

What you’re encountering is that you’re not supplying the param, so the cast is failing, so you’re receiving the hard-coded date you supplied.

If the date param is not found or is not supplied, what value DO you want displayed? Do you want NO date?

Yes, I want to display " NO DATE" if there is not DateTime or “null” values in the database.

I am binding that that Label Text property to the View parameter - ‘Assigned_Date’ which is acting as Input. And that parameter in the Flex Repeater is taking values from the Database but it is showing in the following format - “1,561,503,166,000” or “null”.

If you want it to display “NO DATE”, then change the return value in your script from the hard-coded date to “NO DATE”.

image image

So, it’s still not converting values “1,561,503,166,000” to DateTime format. the expression in the binding still failing and giving me “NO DATE” Values.

Because Assign_Date - which is what you’re supplying as a param - is not the same as Assigned_Date - which is what you’re binding against.
Screen Shot 2020-06-08 at 10.59.55 AM
Screen Shot 2020-06-08 at 11.00.03 AM
Fix your binding.

Oh okay. I got it. Thank you so much @cmallonee for your support and bearing with me!

Have a great day!

1 Like

Happy to help.