Are you trying to do stuff like..
where your htmlcontent1 exist of
Because I'm battling with the same thing.
I have an report, and i have two images on the report (in the same record).
When I click on the image, the report1.event.target.id passes back the image id and the Record.ID passes back the current record, but I cannot affect the image from within appbuilder (yet!)
ie. I want to hide an image.
Is it possible with appbuilder to read a complete JSON file into an object?
Like we do with php.
The exanples of data.json in the report samples all start with a block quote, and not a curly bracket, and we use it by saying something like Record.ID, but usually a json file would start with a curly bracket.
Or am I wrong?
ps. I think the mapping of fields from the json url to the report control is fantastic. But we would have finer control over our app if we could read the json into various objects, and assign these various objects to report controls.
ie. json example
Thanks for demo svanneste.
I got my program working, seems like I was reading old documentation, where setoption does not use a "String" as third parameter.
It was late at night, and I was rambling a bit.
Since we do not have real syntax checking in app builder, I am battling to find my bugs... Seems as if the best bet is to develop a very small bit in each .ab file, and then later add them all together.
ie. If you have a extra space in your setvar declaration, it can cause problems
I've decided to upgrade my internet explorer - so my view in appbuilder works. This does help a lot.
(I tend to forget to run the "inspect" when testing in Chrome.)
Okay thanks for the update, installed it ok. Now, hopefully last question before I can get this together. You mentioned: the Image control has an Error event ready to be used. If I give you some pseudo-code can you show me how to address/trap the error event?
Can you give me a code example how to access and use the image error event? I think once I grasp that I can put this together.
BTW- I notice where you live on your tag; I lived in Aravaca for 5 years (back in the 70's - a lot has changed!). Anyway, nice to meet someone from the old neighborhood, and hello from Oregon.
Thanks
Roger
Thanks for the quick reply; ok, I added the Start/End js; Below is my rough code. It runs through and checks if each image exists, then shows it in AB. When it gets to an image that doesn't exist (ie there is no 8a.jpg), I try to use javascript to re-value window.App.RootScope.picnumber3="1a.jpg" (back to first image). But when I run this, the log shows:
And AB still sees the [picnumber3] is not changed back to the 1a.jpg (first image). Am I setting value of the window.App.RootScope.picnumber3 variable correctly? Failing that, is there a way in AB to capture the "Unresolved" error to flag when to change the value in AB itself?
Let me know if this is not clear. I am enjoying learning from your program!
Thanks
Roger
Hello, i am trying out AppBuilder, and trying to use a button to incrementally show images. That works fine, but when it reaches the last image available, I want it to go to the first image; the number of images will vary as I add more.
I tried using javascript in the button code to check if image exists, but it seems to ignore the script. I have the following:
(images are named 1a.jpg, 1b.jpg, then 2a.jpg, 2b.jpg, etc. (when I click on the image 1a.jpg, it loads 1b.jpg, etc.))
The javascript works outside of appbuilder, in a simple web page, but not in the button code area. Can you advise any simple way to verify if an image exists in folder so I can redirect to first image when image called doesn't exist?
Appreciate your help.
Roger
By the way, can the notifications be styled like in Html.
For example with font color, add icons etc.
Hi David
I did as u advised and finally got it right.
I added all phps as is to the test server and edited the api key right on the server.
Edited the sender ID in the app functions
Redirected all links to the test server
Compiled and built with Cordova.
and voila it worked
Look at the code below.
I created two ABScript functions.
1. SetIni - to save data in localstorage using the "SetOption" supplied by App Builder
2. GetIni - to retrieve data in localstorage using the "GetOption" supplied by App Builder
Example Use:
SetIni "Comment" "[iNewComment.Value]"
SetIni "Date" "[iNewDate.Value]"
SetIni "Category" "[iNewCategory.ItemIndex]"
SetVar "[iOption.Value]" "Whatever" "String"
GetIni "[iOption.Value]" "[Result]"
SetVar "[iOptionValue.Value]" "[Result]" "String"
Functions:
Why did I create these functions?
SetIni:
If I use GetOption with a variable in first parameter, it does not work, I think binding of the variable does not happen when lower function is called.
I always find that I have to use SetVar to link Comment and I, and then use the result of that in GetOption.
GetIni
I found out with the GetIni function, that I cannot define a parameter by address, therefore still need two lines to get the job done.
If I change:
to
the value is not filled into iOptionValue.Value.
I guess it would be better for me to create my functions/procedures as java functions rather than ab functions?
providing you with a little application sample in order to take a look
Hi
I used the sample, and have done all the modifications in the phps; Api key and sender ID, RegisterPush and SendRegisterID functions and built with cordova.
But i think my problem is with the POST in register.php.
Do I need to have a file on my server called RegisterID and what type of file should it be.
Hi david
thats all i get.
I think it has to do with the register.php, line 18
if (issset($_Post['RegisterID']))
Everybody can read the DecSoft support forum for learning purposes, however only DecSoft customers can post new threads. Purchase one or more licenses of some DecSoft products in order to give this and other benefits.