Jump to content

This topic is 4597 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I have an assessment database that enters a green square jpeg into a container field if an answer to a question is marked correct or a red square jpeg if an answer is marked incorrect. Currently I have the green and red square jpeg files standing alone in the directory where the assessment file resides and all has been fine. I now want to use my file with an iPad so I am trying to incorporate the green and red square jpeg files into the assessment file itself which will make things tidier.

I created two tables, green block and red block, created one record in each table that contains a blockID field and a block container field containing the jpeg for the respective table and related them to the main file with a cartesian join. For some reason when I mark a question correct or incorrect an error message appears saying it cannot find green block.jpg or red block.jpg even though they are inserted in the container fields of the red block and green block tables. I am using the following within my 'Correct' script:

Set Variable ($Path, green block::green block, 1)

Goto field Q001

Insert Picture ($Path)

I can achieve my desired result using the Insert Calculated Result function but wonder why the Set variable function won't achieve this.

Posted

There is no SetVariable() function - you mean the Set Variable[] script step.

To answer your question, to insert a picture you need a path to a file. If the file is embedded in another container field, there is no path to it. Of course, you could simply set the field, i.e.

Set Field [ YourTable::Q001 ; green block::green block ]

However, it seems it would be much simpler to use conditional formatting.

Posted

  On 7/31/2012 at 6:38 PM, comment said:

There is no SetVariable() function - you mean the Set Variable[] script step.

To answer your question, to insert a picture you need a path to a file. If the file is embedded in another container field, there is no path to it. Of course, you could simply set the field, i.e.

Set Field [ YourTable::Q001 ; green block::green block ]

However, it seems it would be much simpler to use conditional formatting.

Apologies, I did mean Set Variable [ ] script step.

I guess mistakenly I believed Set Variable ($Path, green block::green block, 1) was defining a path to green block.jpg

Posted

  On 7/31/2012 at 6:58 PM, adyf said:

I guess mistakenly I believed Set Variable ($Path, green block::green block, 1) was defining a path to green block.jpg

You would - if the picture green block.jpg were inserted into the green block::green block field as reference only. But then why would you need the green block::green block field at all?

Posted

  On 7/31/2012 at 7:13 PM, comment said:

You would - if the picture green block.jpg were inserted into the green block::green block field as reference only.

I'm not getting why my script would work if green block::green block field was inserted as reference only but not when embedded in the green block::green block field :hmm:

Anyway, would your suggestion Set Field [ YourTable::Q001 ; green block::green block ] define the path and insert the picture?

Posted

  Quote
why my script would work if green block::green block field was inserted as reference only but not when embedded

I suggest you define another field (result is Text) =

green block::green block

and observe the difference (make the field tall enough to see the entire content).

This topic is 4597 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.