Focal Point
[CLOSED] 8205 Page Designer Optional Amper Issue

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/4547004296

January 23, 2020, 11:30 AM
Dan Brooke
[CLOSED] 8205 Page Designer Optional Amper Issue
Hi FP,

We've found an issue with Page Designer at 8205 that I can't figure out a solution for. We have many fex files which have optional parameters and also reference those parameters in defines. We also exclusively use InfoAssist for fex development; we don't use the text editor for production content.

First, we want optional parameters to be detected as such in Page Designer. Otherwise, we have manual work to configure the ampers in Designer and also if you pull in a fex on an unlocked panel when a page is run and ampers on the fex are required then the end user experience isn't great (there's no All option, it doesn't auto-run, etc).

Imagine the following fex:
DEFINE FILE CAR
D_MODEL/A40 = '&P_MODEL.(FIND MODEL IN CAR).Select Model.';
END

-DEFAULT &P_MODEL = _FOC_NULL

TABLE FILE CAR
PRINT MODEL
WHERE MODEL EQ '&P_MODEL';
END   


The &P_MODEL amper is optional, right?

Nope, not according to Page Designer. Because &P_MODEL is referenced in the DEFINE FILE section, Designer treats the amper as if it's required.

Ok, simple solution, just move the -DEFAULT..._FOC_NULL to the top like this, right?
-DEFAULT &P_MODEL = _FOC_NULL

DEFINE FILE CAR
D_MODEL/A40 = '&P_MODEL.(FIND MODEL IN CAR).Select Model.';
END

TABLE FILE CAR
PRINT MODEL
WHERE MODEL EQ '&P_MODEL';
END


This works like a champ and Page Designer now sees &P_MODEL as optional.

However, we exclusively use InfoAssist... and InfoAssist always places the DEFINE FILE section above the -DEFAULT references of optional parameters. I can't figure out a way to get InfoAssist to allow me to reference the -DEFAULT first and I can't figure out how to get Designer to admit that in the first fex above &P_MODEL is, in fact, optional.

Sorry for the long post but it's a somewhat nuanced issue and wanted to give enough detail. Any suggestions or help are appreciated!!

Dan

This message has been edited. Last edited by: FP Mod Chuck,


Dan B.
WebFocus 8205M
January 23, 2020, 11:59 AM
BabakNYC
Admittedly, I'm testing this in 8206. However, I put the first fex in a designer page, allowed it to create the parameter and changed the settings for the parameter to OPTIONAL and SHOW ALL OPTION and got exactly what you're asking for. Is this not what you're trying to accomplish?


WebFOCUS 8206, Unix, Windows
January 23, 2020, 12:12 PM
Dan Brooke
Hi Babak,

Because you have to manually set the amper to optional, it doesn't give what I'm after.

Try this, please:
-Create a page with a single, empty panel which is not locked
-Run that page
-Click the + on the panel and pull in the fex with the first set of code in my OP
-The page will pull in the fex but the amper it detects will not be optional (at 8205 anyway) and therefore the report won't run until you select something and you also don't get an All Values option; which is no fun for an end user

Thanks for looking at this, Babak!

Dan


Dan B.
WebFocus 8205M
January 23, 2020, 12:38 PM
BabakNYC
That's what I tested.

You are correct. After you put the fex in the page and create the parameter the drop down has no default value and doesn't allow you to select all. However, if you open the parameter's Properties (top right button) in the page designer you'll see the two buttons that address this. Under Control Settings you'll see an Optional button and below that under Data Settings there's a Show All option. By default they're off.

https://webfocusinfocenter.inf...using_wfdesigner.htm

This message has been edited. Last edited by: BabakNYC,


WebFOCUS 8206, Unix, Windows
January 23, 2020, 12:52 PM
Dan Brooke
Now take the second fex text from the OP and see the behavior. It comes in as optional with no further manipulation. The only difference is where the -DEFAULT is in the fex.

Next, imagine an end-user running a portal and adding new content to the page using the + button or Replace option. They have no access to Page Designer (and probably no skillset or patience to use it if they did). We would rather this end-user experience.

I'm really hoping for a solution other than editing the page in Designer so we can meet the needs of non-technical end users.

Thanks!

Dan

-Edited because the original version wasn't very appreciative!


Dan B.
WebFocus 8205M
January 23, 2020, 01:00 PM
BabakNYC
Noted! However, it looks like Page Designer and content Authoring are going to merge into one in 8207. This would be the time to bring this up with IB Tech Support to let them know the UX isn't meeting your expectations. I do expect this'll go away once all content authoring is merged into one tool set.


WebFOCUS 8206, Unix, Windows
January 23, 2020, 01:33 PM
Dan Brooke
Thanks for all the suggestions so far.

I'm optimistic with 8207 or higher will make this easier. However, I'm really hoping I can get advice on how to resolve this now.

I have full access to our universal profile, etc and I'm willing to make whatever changes we need t but I'm simply out of ideas.

I've moved the -DEFAULT to the top of the fex in the text editor (which works) but as soon as it's opened in InfoAssist again the -DEFAULT lines are put right back where they were. If I put the -DEFAULT into the universal profile then everything works great; but obviously then every single fex prompts for that amper, which we can't have. I could do a -INCLUDE at the top of the fex referencing another fex which sets the -DEFAULT values but putting -INCLUDE in the fex makes it incompatible with InfoAssist.

Does anyone know how to setup an amper so Page Designer correctly identifies it as optional?


Dan B.
WebFocus 8205M
January 24, 2020, 09:35 AM
Satheesh Babu
Hi Dan,
In the Page Filter control Settings There is an option to Set Default Value.
1. I created a page and added the example code which you gave.
2. Added the filter
3. In the filter settings i changed the control to optional and enabled to Show all.
4. Also i set the Default value text box to _FOC_NULL

5. When i ran the page it didn't show the required optional parameter and it just ran.

is this the behavior are you expecting ?


WebFOCUS 8.2.04
AIX/UNIX/Windows, All Outputs