CSV data source woes


#1

Hi Guys,

 

- Running 4.18.0

 

I'm a bit of a newbie to CSV datasources and I seem to be not having any luck creating  the shadow assets in the system. There are no spaces in the CSV file and I'm getting the following matrix warning

 

(/core/include/asset.inc:3612) - Attribute "short" not found for Asset "data_source_record_set" [SYS0094] [2014-10-14 09:58:41]

 

The asset map loads like there is children underneath - but there is none.

 

what   am I missing?

 

 

cheers

 


(Ashish Karelia) #2

Can you paste example content of you CSV data.

Also is "Use first row as attribute names?" or "Use first column as row identifier?" set to yes and if you have tried toggling them to "No"

 

Ash


#3

Thanks Ash! I actually did have spaces in the CSV! argh! thanks so much


#4

hi guys,

 

I'm working from tutorial on http://forums.squizsuite.net/index.php?showtopic=11377

 

I basically just want to filter the start_time for my data source and its returning all the results and I've buggered it up.

 

 

Record filters include -

Record fieldset name

ds__start_time

variable

%%start_time_value%%

 

 ( Matching exact)

 

Data mappings -

 

Paramenter : start_time_value

Source variable name:  start_time

 

 

My form

 

<form action="./?a=1137974" method="get"> <div class="form-actions">
<label for="start_time">Enter a time:
<input type="text" name="start_time"/></label>
<button type="submit" class="button">Go</button>
</div>
</form>

 

and the asset listing

  Parameter

			Source
	
			Replacement Root node for the listing (must be a child of the static root node)
		
			
							<strong>GET Variable Name</strong>
						
							start_time_value

#5

any ideas on the above guys?


#6

Hi Guys,

I'm still having problems with getting my data source to filter. Any ideas where I went wrong please let me know.

thanks heaps


(Ashish Karelia) #7

 

hi guys,

 

I'm working from tutorial on http://forums.squizsuite.net/index.php?showtopic=11377

 

I basically just want to filter the start_time for my data source and its returning all the results and I've buggered it up.

 

 

Record filters include -

Record fieldset name

ds__start_time

variable

%%start_time_value%%

 

 ( Matching exact)

 

Data mappings -

 

Paramenter : start_time_value

Source variable name:  start_time

 

 

My form

 

<form action="./?a=1137974" method="get"> <div class="form-actions">
<label for="start_time">Enter a time:
<input type="text" name="start_time"/></label>
<button type="submit" class="button">Go</button>
</div>
</form>

 

and the asset listing

 Parameter Source Replacement Root node for the listing (must be a child of the static root node) GET Variable Name start_time_value

 

 

Hi,

Sorry about the delay in replying.

You setting, Source variable name:  start_time, what the Source variable type? I'd like to know if it's a GET or POST or something.

 

Also what version of Matrix are you using?

 

Ash


#8

 

Hi,

Sorry about the delay in replying.

You setting, Source variable name:  start_time, what the Source variable type? I'd like to know if it's a GET or POST or something.

 

Also what version of Matrix are you using?

 

Ash

 

Hey Ash,

no need to apologies - your helping me - it's appreciated!

 

I'm trying anything that sticks!

 

 

I'm listing  Data Source Record Set

on the asset list

 

Parameter Source Array of specific asset IDs or selection group (specified assets must be children of the static related node) GET Variable Name start_time_value

 

 

Using matrix 4.18.0


(Ashish Karelia) #9

So, if I understand the implementation correctly, your form is submitting and the value in form is what you want your results to be filtered by?

 

Without seeing the actual implementation it's a bit difficult for me to visualise but I have a feeling you should be using POST instead of get.

Also on the landing page (after the form is submitted), can you place %globals_get_blah% and %globals_post_blah% keywords (where blah needs to be replaced by the index you are posting to. I think it is 'start_time') to see if they they are getting printed and if yes what's the value for it.

 

Ash


#10

So, if I understand the implementation correctly, your form is submitting and the value in form is what you want your results to be filtered by?

 

Without seeing the actual implementation it's a bit difficult for me to visualise but I have a feeling you should be using POST instead of get.

Also on the landing page (after the form is submitted), can you place %globals_get_blah% and %globals_post_blah% keywords (where blah needs to be replaced by the index you are posting to. I think it is 'start_time') to see if they they are getting printed and if yes what's the value for it.

 

Ash

Hey Ash yep that's correct.

The form is submitting but it returns everything. Even if I put a random word in the form that I know is not even in the data source it returns all results.

 

I did place %globals_get_start_time% %globals_post_start_time% in the body copy of my asset list  ( under my table) and  it did return the value that I placed in the form - but doesn't filter any values.

 

I'm not sure if I have followed you correctly


(Ashish Karelia) #11

Okie I am getting to understand set up now. So is the db data source nested within something?

What is it nested within?

 

Also if nesting, what is the configuration set up there? can paste a screen shot of the nesting container ?

 

On Asset listing, apart from general set up about the root node, asset to list and stuff, are you doing something dynamic there?

I'm asking because the "Parameter Source Replacement Root node for the listing (must be a child of the static root node) GET Variable Name start_time_value" error is likely coming from "Dynamic Parameters" of asset lsiting (detaisl screen).

 

Am I right in understanding your set up?

 

Ash


(Ashish Karelia) #12

I'll actually try to be more clear about my understanding rather than going back and forth:  

- You have a form on standard page whihc is submitting to itself. (on submit is the submitted value gettign appended to the url?

 

- There is a asset listing page nested within standard page.

 

- Asset listing is just listing data record sets for DB data source (or is is CSV?). Are you trying to do anything dynamic here?

 

 

Do you have a sample data to show the content of the record sets and what 'term' you are using to filter the records?


#13

hey ash,

- I have a form on a standard page which submits to the asset listing ( that lists the data source record sets)

- I am assuming I would need to place the variables also on the asset listing

- The asset listing is nested in a standard page

- the data source is a csv datasource. I don't need  it to do anything dynamic I just need it to return the results just to start with.

 

an example of the records

Array
(
    [0] => Array
        (
            [date] => 20/11/2013
            [start_time] => 11:00:00 AM
            [end_time] => 11:20:00 AM
            [stream] => Main
            [theme] => Workplace learning at CSU
            [topic] => Advancing workplace learning at CSU
            [venue_building] => C2
            [room] => 315
            [presenter] => Garry Marchant
            [facilitator] => Wendy Bowles
        )
&#91;1] =&gt; Array
    (
        &#91;date] =&gt; 20/11/2013
        &#91;start_time] =&gt; 11:20:00 AM
        &#91;end_time] =&gt; 11:40:00 AM
        &#91;stream] =&gt; Main
        &#91;theme] =&gt; Workplace learning at CSU
        &#91;topic] =&gt; Overview of EFPI online resources
        &#91;venue_building] =&gt; C2
        &#91;room] =&gt; 315
        &#91;presenter] =&gt; Franziska Trede,Andreas Kuswara
        &#91;facilitator] =&gt; Wendy Bowles
    )</pre>

the term used to filter the records is start_time  i initially had start_time_value in the form as I thought they had to be different


(Ashish Karelia) #14

From what I understand the setup is similar to the other topic yu refered to.

Somehow the set isn't working for you.

 

On the nesting container within standard page, are you passing the variables/value to asset listing?

 

You can add keywords to pass to asset listing page via 'Send the following additional GET variables to the asset'. But on Data source if you are using %globals_get/post_*% keyword then you won't need to do this.

 

Let's try something different. Can you set the Data source to filter by something else, say 'presenter' and test the set up?

I am having a feeling the issue may be because of the way time string is passed to Matrix for global get/post keywords which only allows the following list of characters on 4.10.x version:

A-Z, a-z. 0-9, ., -, _, %, $, (, ,) ,= ,[ ,] ,


#15

hey Ash  =)

no I'm  missing something the other values don't work either. I have attached a PDF of my screens.

 

I'm sure you would be able to see straight away what i'm doing wrong here


(Joel Porgand) #16

hey Ash  =)

no I'm  missing something the other values don't work either. I have attached a PDF of my screens.

 

I'm sure you would be able to see straight away what i'm doing wrong here

 

in the data mappings section don't use the %globals_% keyword format just use the variable names (ie. start_time & presenter)


#17

 

in the data mappings section don't use the %globals_% keyword format just use the variable names (ie. start_time & presenter)

hey JP thanks for having a look!

I had tried this earlier as well I have been placing everything in there to try and get it to work and it's returning no results =(


(Ashish Karelia) #18

hey Ash  =)

no I'm  missing something the other values don't work either. I have attached a PDF of my screens.

 

I'm sure you would be able to see straight away what i'm doing wrong here

 

Hi,

From the looks of it, it doesn't seem like you'll need the dynamic parameter set up on the asset listing.

You are not passing the asset  ids in the get/post var are you?

 

From  what I understand, asset listing doesn't need to filter the assets. It will just list the assets.

The filtering is done by data source.

 

Can you give it a go by removing that part from your set up pls?

 

Ash


#19

 

Hi,

From the looks of it, it doesn't seem like you'll need the dynamic parameter set up on the asset listing.

You are not passing the asset  ids in the get/post var are you?

 

From  what I understand, asset listing doesn't need to filter the assets. It will just list the assets.

The filtering is done by data source.

 

Can you give it a go by removing that part from your set up pls?

 

Ash

Hey Ash thanks for taking a look. I removed the variables from the asset list and still no love. Sorry about that I won't waste any more of your time.


(Ashish Karelia) #20

Awww!

Looks like there is something silly going on in here.

If the csv document isn't too classified, feel free to email it to me and I can try to set it u muself on a 4.10.x system and see what's happening.

 

Also, if it suits, it looks like you are Squiz Client. I'd suggest you raise a support ticket request. This will help you get one of the Squiz's technical consultant on your case.

 

Ash